diff --git a/hosts/chmura/configuration.nix b/hosts/chmura/configuration.nix index ed46c35..d032ed1 100644 --- a/hosts/chmura/configuration.nix +++ b/hosts/chmura/configuration.nix @@ -47,6 +47,7 @@ in { myOptions = { other.home-manager.enable = true; programs = { + agenix.enable = true; git = { enable = true; defaultBranch = "master"; diff --git a/hosts/default.nix b/hosts/default.nix index 16561ec..ee6b031 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -13,7 +13,6 @@ in { modules = [ ./niks ../modules - inputs.agenix.nixosModules.default ]; }; @@ -25,7 +24,6 @@ in { modules = [ ./del ../modules - inputs.agenix.nixosModules.default ]; }; @@ -48,7 +46,6 @@ in { modules = [ ./chmura ../modules - inputs.agenix.nixosModules.default ]; }; } diff --git a/hosts/del/configuration.nix b/hosts/del/configuration.nix index 4f0839d..7499b0b 100644 --- a/hosts/del/configuration.nix +++ b/hosts/del/configuration.nix @@ -140,6 +140,7 @@ in { enableDirenv = true; }; programs = { + agenix.enable = true; nh = let inherit (config.myOptions.other.system) username; home = config.home-manager.users.${username}.home.homeDirectory; diff --git a/hosts/del/programs.nix b/hosts/del/programs.nix index e1dc433..f0a2258 100644 --- a/hosts/del/programs.nix +++ b/hosts/del/programs.nix @@ -12,7 +12,6 @@ in { shadower = inputs.shadower.packages.${pkgs.system}; fenix = inputs.fenix.packages.${pkgs.system}; nixpkgs-wayland = inputs.nixpkgs-wayland.packages.${pkgs.system}; - agenix = inputs.agenix.packages.${pkgs.system}; in with pkgs; [ librewolf-wayland keepassxc @@ -128,7 +127,6 @@ in { tree ydotool piper - agenix.default exiv2 krita gamescope diff --git a/hosts/niks/configuration.nix b/hosts/niks/configuration.nix index 991a6e2..3bd023c 100644 --- a/hosts/niks/configuration.nix +++ b/hosts/niks/configuration.nix @@ -76,6 +76,7 @@ in { enableDirenv = true; }; programs = { + agenix.enable = true; nh = let inherit (config.myOptions.other.system) username; home = config.home-manager.users.${username}.home.homeDirectory; diff --git a/hosts/niks/programs.nix b/hosts/niks/programs.nix index 3c630e5..993c625 100644 --- a/hosts/niks/programs.nix +++ b/hosts/niks/programs.nix @@ -12,7 +12,6 @@ in { shadower = inputs.shadower.packages.${pkgs.system}; fenix = inputs.fenix.packages.${pkgs.system}; nixpkgs-wayland = inputs.nixpkgs-wayland.packages.${pkgs.system}; - agenix = inputs.agenix.packages.${pkgs.system}; in with pkgs; [ librewolf-wayland keepassxc @@ -128,7 +127,6 @@ in { tree ydotool piper - agenix.default exiv2 krita gamescope diff --git a/modules/cli/agenix.nix b/modules/cli/agenix.nix new file mode 100644 index 0000000..28a969b --- /dev/null +++ b/modules/cli/agenix.nix @@ -0,0 +1,27 @@ +{ + config, + inputs, + lib, + pkgs, + ... +}: let + cfg = config.myOptions.programs.agenix; + + inherit (config.myOptions.other.system) username; + + inherit (lib) mkEnableOption mkIf; +in { + options.myOptions.programs.agenix = { + enable = mkEnableOption "agenix"; + }; + + imports = [ inputs.agenix.nixosModules.default ]; + + config = mkIf cfg.enable { + home-manager.users.${username} = { + home.packages = [ + inputs.agenix.packages.${pkgs.system}.default + ]; + }; + }; +} diff --git a/modules/cli/default.nix b/modules/cli/default.nix index b681026..66e7be8 100644 --- a/modules/cli/default.nix +++ b/modules/cli/default.nix @@ -1,5 +1,6 @@ _: { imports = [ + ./agenix.nix ./git.nix ./nh.nix ./starship.nix