diff options
author | rnhmjoj <rnhmjoj@inventati.org> | 2020-06-21 15:28:54 +0200 |
---|---|---|
committer | rnhmjoj <rnhmjoj@inventati.org> | 2020-07-04 12:14:37 +0200 |
commit | a6ed7d4845f1142f36b2c461d5a721bc68eb7d48 (patch) | |
tree | 50b95042513324ee3ba288bce3ff64239b5d4776 /nixos | |
parent | b2aa673d5ac626c429417ef4cb4ff9c866ff74f4 (diff) | |
download | nixpkgs-a6ed7d4845f1142f36b2c461d5a721bc68eb7d48.tar nixpkgs-a6ed7d4845f1142f36b2c461d5a721bc68eb7d48.tar.gz nixpkgs-a6ed7d4845f1142f36b2c461d5a721bc68eb7d48.tar.bz2 nixpkgs-a6ed7d4845f1142f36b2c461d5a721bc68eb7d48.tar.lz nixpkgs-a6ed7d4845f1142f36b2c461d5a721bc68eb7d48.tar.xz nixpkgs-a6ed7d4845f1142f36b2c461d5a721bc68eb7d48.tar.zst nixpkgs-a6ed7d4845f1142f36b2c461d5a721bc68eb7d48.zip |
nixos/users-groups: remove ancient security.initialRootPassword option
This option has been deprecated for a long time because is redundant (users.users.root.initialHashedPassword exists). Moreover, being of type string, it required to handle the special value "!" separately, instead of using just `null`.
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/config/users-groups.nix | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/nixos/modules/config/users-groups.nix b/nixos/modules/config/users-groups.nix index c2f16e5ed8e..83296a54bc4 100644 --- a/nixos/modules/config/users-groups.nix +++ b/nixos/modules/config/users-groups.nix @@ -415,6 +415,12 @@ in { imports = [ (mkAliasOptionModule [ "users" "extraUsers" ] [ "users" "users" ]) (mkAliasOptionModule [ "users" "extraGroups" ] [ "users" "groups" ]) + (mkChangedOptionModule + [ "security" "initialRootPassword" ] + [ "users" "users" "root" "initialHashedPassword" ] + (cfg: if cfg.security.initialHashedPassword == "!" + then null + else cfg.security.initialHashedPassword)) ]; ###### interface @@ -486,14 +492,6 @@ in { ''; }; - # FIXME: obsolete - will remove. - security.initialRootPassword = mkOption { - type = types.str; - default = "!"; - example = ""; - visible = false; - }; - }; @@ -508,7 +506,6 @@ in { home = "/root"; shell = mkDefault cfg.defaultUserShell; group = "root"; - initialHashedPassword = mkDefault config.security.initialRootPassword; }; nobody = { uid = ids.uids.nobody; @@ -597,7 +594,7 @@ in { || cfg.group == "wheel" || elem "wheel" cfg.extraGroups) && - ((cfg.hashedPassword != null && cfg.hashedPassword != "!") + (cfg.hashedPassword != null || cfg.password != null || cfg.passwordFile != null || cfg.openssh.authorizedKeys.keys != [] |