forked from mirrors/nixpkgs
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`.
This commit is contained in:
parent
b2aa673d5a
commit
a6ed7d4845
|
@ -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 != []
|
||||
|
|
Loading…
Reference in a new issue