diff options
Diffstat (limited to 'modules/nixos/base.nix')
| -rw-r--r-- | modules/nixos/base.nix | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/modules/nixos/base.nix b/modules/nixos/base.nix index 361829a..83212fe 100644 --- a/modules/nixos/base.nix +++ b/modules/nixos/base.nix @@ -79,18 +79,11 @@ in { defaultUserShell = pkgs.bash; mutableUsers = false; - users.root = let - # yes this is a bad way to detect which option should be used (or exists) - # but i'm lazy. please do not copy this - passwordFile = - if lib.versionAtLeast config.system.stateVersion "23.11" - then "hashedPasswordFile" - else "passwordFile"; - in { + users.root = { home = mkDefault "/root"; uid = mkDefault config.ids.uids.root; group = mkDefault "root"; - "${passwordFile}" = mkDefault config.age.secrets.rootPassword.path; + hashedPasswordFile = mkDefault config.age.secrets.rootPassword.path; }; }; } |
