From 76a2eeda57fd553b17cd766281309411a45d6189 Mon Sep 17 00:00:00 2001 From: jacekpoz Date: Wed, 2 Oct 2024 16:49:35 +0200 Subject: [PATCH] move agenix into hosts/common --- hosts/chmura/configuration.nix | 1 - hosts/common/core/agenix.nix | 14 ++++++++++++++ hosts/common/core/default.nix | 1 + hosts/del/configuration.nix | 1 - hosts/hape/configuration.nix | 1 - hosts/niks/configuration.nix | 1 - hosts/work/configuration.nix | 1 - modules/cli/agenix.nix | 28 ---------------------------- modules/cli/default.nix | 1 - 9 files changed, 15 insertions(+), 34 deletions(-) create mode 100644 hosts/common/core/agenix.nix delete mode 100644 modules/cli/agenix.nix diff --git a/hosts/chmura/configuration.nix b/hosts/chmura/configuration.nix index 8b6b078..0146b7e 100644 --- a/hosts/chmura/configuration.nix +++ b/hosts/chmura/configuration.nix @@ -56,7 +56,6 @@ in { poz = { other.home-manager.enable = true; programs = { - agenix.enable = true; git = { enable = true; defaultBranch = "master"; diff --git a/hosts/common/core/agenix.nix b/hosts/common/core/agenix.nix new file mode 100644 index 0000000..92f01c3 --- /dev/null +++ b/hosts/common/core/agenix.nix @@ -0,0 +1,14 @@ +{ + config, + inputs, + pkgs, + ... +}: let + inherit (config.poz.other.system) username; +in { + imports = [ inputs.agenix.nixosModules.default ]; + + users.users.${username}.packages = [ + inputs.agenix.packages.${pkgs.system}.default + ]; +} diff --git a/hosts/common/core/default.nix b/hosts/common/core/default.nix index 985f68b..f855c0b 100644 --- a/hosts/common/core/default.nix +++ b/hosts/common/core/default.nix @@ -1,5 +1,6 @@ _: { imports = [ + ./agenix.nix ./binary-caches.nix ./dash.nix ./dbus.nix diff --git a/hosts/del/configuration.nix b/hosts/del/configuration.nix index 813719a..eeb2838 100644 --- a/hosts/del/configuration.nix +++ b/hosts/del/configuration.nix @@ -103,7 +103,6 @@ in { networking.enable = true; }; programs = { - agenix.enable = true; nh = let home = config.home-manager.users.${username}.home.homeDirectory; in { diff --git a/hosts/hape/configuration.nix b/hosts/hape/configuration.nix index cd4d144..20b1fae 100644 --- a/hosts/hape/configuration.nix +++ b/hosts/hape/configuration.nix @@ -17,7 +17,6 @@ networking.enable = true; }; programs = { - agenix.enable = true; nh = let inherit (config.poz.other.system) username; home = config.home-manager.users.${username}.home.homeDirectory; diff --git a/hosts/niks/configuration.nix b/hosts/niks/configuration.nix index 50d3e31..b3617dc 100644 --- a/hosts/niks/configuration.nix +++ b/hosts/niks/configuration.nix @@ -58,7 +58,6 @@ in { networking.enable = true; }; programs = { - agenix.enable = true; nh = let inherit (config.poz.other.system) username; home = config.home-manager.users.${username}.home.homeDirectory; diff --git a/hosts/work/configuration.nix b/hosts/work/configuration.nix index 28f8af2..d60bbd1 100644 --- a/hosts/work/configuration.nix +++ b/hosts/work/configuration.nix @@ -60,7 +60,6 @@ in { }; }; programs = { - agenix.enable = true; nh = let home = config.home-manager.users.${username}.home.homeDirectory; in { diff --git a/modules/cli/agenix.nix b/modules/cli/agenix.nix deleted file mode 100644 index a16c0f1..0000000 --- a/modules/cli/agenix.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ - config, - inputs, - lib, - pkgs, - ... -}: let - cfg = config.poz.programs.agenix; - - inherit (config.poz.other.system) username; - - inherit (lib.modules) mkIf; - inherit (lib.options) mkEnableOption; -in { - options.poz.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 66e7be8..b681026 100644 --- a/modules/cli/default.nix +++ b/modules/cli/default.nix @@ -1,6 +1,5 @@ _: { imports = [ - ./agenix.nix ./git.nix ./nh.nix ./starship.nix