move from real users to passwd file
This commit is contained in:
parent
4fc8a1ed05
commit
2d0648e0f4
4 changed files with 16 additions and 14 deletions
|
@ -28,16 +28,6 @@ let
|
|||
group = vmailGroupName;
|
||||
};
|
||||
|
||||
# accountsToUser :: String -> UserRecord
|
||||
accountsToUser = account: {
|
||||
isNormalUser = false;
|
||||
group = vmailGroupName;
|
||||
inherit (account) hashedPassword name;
|
||||
};
|
||||
|
||||
# mail_users :: { [String]: UserRecord }
|
||||
mail_users = lib.foldl (prev: next: prev // { "${next.name}" = next; }) {}
|
||||
(map accountsToUser (lib.attrValues loginAccounts));
|
||||
|
||||
virtualMailUsersActivationScript = pkgs.writeScript "activate-virtual-mail-users" ''
|
||||
#!${pkgs.stdenv.shell}
|
||||
|
@ -77,7 +67,7 @@ in {
|
|||
};
|
||||
|
||||
# define all users
|
||||
users.users = mail_users // {
|
||||
users.users = {
|
||||
"${vmail_user.name}" = lib.mkForce vmail_user;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue