Handle initialPassword and initialHashedPassword for !mutableUsers
In this case, they're equivalent to setting ‘password’ and ‘hashedPassword’ (since there is no distinction between an initial and non-initial user account state).
This commit is contained in:
parent
3696536115
commit
f8f787b800
@ -235,6 +235,14 @@ let
|
|||||||
useDefaultShell = mkDefault true;
|
useDefaultShell = mkDefault true;
|
||||||
isSystemUser = mkDefault false;
|
isSystemUser = mkDefault false;
|
||||||
})
|
})
|
||||||
|
# If !mutableUsers, setting ‘initialPassword’ is equivalent to
|
||||||
|
# setting ‘password’ (and similarly for hashed passwords).
|
||||||
|
(mkIf (!cfg.mutableUsers && config.initialPassword != null) {
|
||||||
|
password = mkDefault config.initialPassword;
|
||||||
|
})
|
||||||
|
(mkIf (!cfg.mutableUsers && config.initialHashedPassword != null) {
|
||||||
|
hashedPassword = mkDefault config.initialHashedPassword;
|
||||||
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user