support unhashed password files
This commit is contained in:
@@ -45,12 +45,19 @@ rec {
|
||||
in
|
||||
lib.mapAttrs (
|
||||
name: value:
|
||||
if value.hashedPasswordFile == null then
|
||||
if value.hashedPasswordFile != null then
|
||||
value.hashedPasswordFile
|
||||
else if value.hashedPassword != null then
|
||||
builtins.toString (mkHashFile name value.hashedPassword)
|
||||
else
|
||||
value.hashedPasswordFile
|
||||
value.passwordFile
|
||||
) cfg.loginAccounts;
|
||||
|
||||
# Collect accounts with plain text passwords that require hashing
|
||||
accountsWithPlaintextPasswordFiles = lib.filter (
|
||||
name: cfg.loginAccounts.${name}.passwordFile != null
|
||||
) (builtins.attrNames cfg.loginAccounts);
|
||||
|
||||
# Appends the LDAP bind password to files to avoid writing this
|
||||
# password into the Nix store.
|
||||
appendLdapBindPwd =
|
||||
|
||||
Reference in New Issue
Block a user