From 6d2b195213f14a443d3a1a3c8713468cb3ab41a5 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Mon, 25 Jul 2016 18:16:15 +0200 Subject: [PATCH] implements transformation valias -> String it is still kind of unclear to me how [String] should get mapped to String --- mail-server.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/mail-server.nix b/mail-server.nix index 0ecaaaf..f661fd3 100644 --- a/mail-server.nix +++ b/mail-server.nix @@ -26,12 +26,22 @@ let createHome = true; group = vmail_group_name; }]; + + # accountsToUser :: String -> UserRecord accountsToUser = x: { name = x + "@" + domain; isNormalUser = false; group = vmail_group_name; }; + + # mail_user :: [ UserRecord ] 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 { networking.hostName = host_prefix + "." + domain;