diff options
| author | Seth Flynn <[email protected]> | 2025-02-13 20:21:26 -0500 |
|---|---|---|
| committer | Seth Flynn <[email protected]> | 2025-02-13 22:09:11 -0500 |
| commit | 102c93593af02273a5d7c2c618e9dea1a3cee747 (patch) | |
| tree | fe69f3899261b8ed66fe39d035a4078f1037dee8 /modules/nixos/traits | |
| parent | 6fa0b2f154620cf8da209320865ac4a20e83b9ae (diff) | |
nixos/server: don't give system user password
Diffstat (limited to 'modules/nixos/traits')
| -rw-r--r-- | modules/nixos/traits/secrets.nix | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/modules/nixos/traits/secrets.nix b/modules/nixos/traits/secrets.nix index 9216633..0423183 100644 --- a/modules/nixos/traits/secrets.nix +++ b/modules/nixos/traits/secrets.nix @@ -2,21 +2,17 @@ config, lib, inputs, - secretsDir, ... }: + let cfg = config.traits.secrets; in + { options.traits.secrets = { enable = lib.mkEnableOption "secrets management"; - hostUser = lib.mkEnableOption "manager secrets for host user (see `profiles.server.hostUser`)" // { - default = config.profiles.server.hostUser; - defaultText = "config.profiles.server.hostUser"; - }; - secretsDir = lib.mkOption { type = lib.types.path; default = inputs.self + "/secrets/${config.networking.hostName}"; @@ -38,16 +34,6 @@ in identityPaths = [ "/etc/age/key" ]; }; } - - (lib.mkIf (config.profiles.server.enable && cfg.hostUser) { - age.secrets = { - userPassword.file = secretsDir + "/userPassword.age"; - }; - - users.users.${config.networking.hostName} = { - hashedPasswordFile = config.age.secrets.userPassword.path; - }; - }) ] ); } |
