mirror of
https://gitlab.com/simple-nixos-mailserver/nixos-mailserver.git
synced 2024-12-28 07:56:12 +01:00
implements transformation valias -> String
it is still kind of unclear to me how [String] should get mapped to String
This commit is contained in:
parent
6d104b99d0
commit
6d2b195213
1 changed files with 10 additions and 0 deletions
|
@ -26,12 +26,22 @@ let
|
||||||
createHome = true;
|
createHome = true;
|
||||||
group = vmail_group_name;
|
group = vmail_group_name;
|
||||||
}];
|
}];
|
||||||
|
|
||||||
|
# accountsToUser :: String -> UserRecord
|
||||||
accountsToUser = x: {
|
accountsToUser = x: {
|
||||||
name = x + "@" + domain;
|
name = x + "@" + domain;
|
||||||
isNormalUser = false;
|
isNormalUser = false;
|
||||||
group = vmail_group_name;
|
group = vmail_group_name;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# mail_user :: [ UserRecord ]
|
||||||
mail_user = map accountsToUser login_accounts;
|
mail_user = map accountsToUser login_accounts;
|
||||||
|
|
||||||
|
# valiasToString :: { from = "..."; to = "..." } -> String
|
||||||
|
valiasToString = x: x.from + "@" + domain + " " + x.to "@" + domain + "\n";
|
||||||
|
|
||||||
|
# valiasFile :: [ String ]
|
||||||
|
valiasFile = map valiasToString valiases;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
networking.hostName = host_prefix + "." + domain;
|
networking.hostName = host_prefix + "." + domain;
|
||||||
|
|
Loading…
Reference in a new issue