From 91c1e2d69539033813c063f74d79c400b7affbb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Krop=C3=A1=C4=8Dek?= Date: Tue, 24 Sep 2024 10:23:11 +0200 Subject: [PATCH] created cli module --- hosts/base/default.nix | 4 +--- nixosModules/dev/cli.nix | 38 ++++++++++++++++++++++++++++++++++++ nixosModules/dev/default.nix | 26 +----------------------- 3 files changed, 40 insertions(+), 28 deletions(-) create mode 100644 nixosModules/dev/cli.nix diff --git a/hosts/base/default.nix b/hosts/base/default.nix index a34de4a..d3ecafc 100644 --- a/hosts/base/default.nix +++ b/hosts/base/default.nix @@ -129,11 +129,9 @@ mattermost-desktop gh gparted - dig prismlauncher # REMOVE AND MOVE TO games module after refactoring - gnome-extension-manager # DEBUG - gnomeExtensions.grand-theft-focus joplin-desktop + albert ]; programs = { diff --git a/nixosModules/dev/cli.nix b/nixosModules/dev/cli.nix new file mode 100644 index 0000000..c7f0189 --- /dev/null +++ b/nixosModules/dev/cli.nix @@ -0,0 +1,38 @@ +{ + config, + pkgs, + lib, + ... +}@inputs: +let + cfg = config.krop.cli; +in +{ + options.krop.cli = { + enable = lib.mkOption { + type = lib.types.bool; + default = true; + example = true; + description = "Whether to install the most used tools"; + }; + install-editors = lib.mkOption { + type = lib.types.bool; + default = true; + example = true; + description = "Whether to install cli editors"; + }; + }; + config = lib.mkIf cfg.enable { + environment.systemPackages = + with pkgs; + [ + openssl_3_3 + dig + ] + ++ lib.optionals cfg.install-editors [ + pkgs.lazygit + pkgs.lazydocker + pkgs.micro-with-wl-clipboard + ]; + }; +} diff --git a/nixosModules/dev/default.nix b/nixosModules/dev/default.nix index c9891b7..a362471 100644 --- a/nixosModules/dev/default.nix +++ b/nixosModules/dev/default.nix @@ -4,34 +4,10 @@ lib, ... }@inputs: -let - cfg = config.krop.devtools; -in { imports = [ ./python.nix ./ide.nix + ./cli.nix ]; - options.krop.devtools = { - installTools = lib.mkOption { - type = lib.types.bool; - default = true; - example = true; - description = "Whether to install the most used tools"; - }; - }; - - config = - let - tools = with pkgs; [ - lazygit - lazydocker - micro-with-wl-clipboard - albert - openssl_3_3 - ]; - in - { - environment.systemPackages = tools; - }; }