From fc553d09d464ddde2ce34cffa0200f18004a5d38 Mon Sep 17 00:00:00 2001 From: Seth Flynn Date: Thu, 13 Feb 2025 20:45:30 -0500 Subject: nixos/agenix: make it a mixin --- modules/nixos/profiles/server.nix | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'modules/nixos/profiles/server.nix') diff --git a/modules/nixos/profiles/server.nix b/modules/nixos/profiles/server.nix index 8934863..09d1076 100644 --- a/modules/nixos/profiles/server.nix +++ b/modules/nixos/profiles/server.nix @@ -2,6 +2,7 @@ config, lib, secretsDir, + inputs, inputs', ... }: @@ -23,8 +24,12 @@ in config = lib.mkIf cfg.enable ( lib.mkMerge [ { - # All servers are most likely on stable, so we want to pull in some newer packages from time to time - _module.args.unstable = inputs'.nixpkgs.legacyPackages; + _module.args = { + # All servers are most likely on stable, so we want to pull in some newer packages from time to time + unstable = inputs'.nixpkgs.legacyPackages; + + secretsDir = inputs.self + "/secrets/${config.networking.hostName}"; + }; age.secrets = { tailscaleAuthKey.file = "${secretsDir}/tailscaleAuthKey.age"; @@ -61,10 +66,6 @@ in }; }; - traits = { - secrets.enable = true; - }; - # I use exclusively Tailscale auth on some machines users.allowNoPasswordLogin = true; -- cgit v1.2.3