From c987d118fd52dcbc3766d12aab0b3536de0f4a0c Mon Sep 17 00:00:00 2001 From: niten Date: Sun, 24 Sep 2023 23:26:41 -0700 Subject: [PATCH] Add alias options --- mail-server.nix | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/mail-server.nix b/mail-server.nix index ca0fbc8..e21a806 100644 --- a/mail-server.nix +++ b/mail-server.nix @@ -41,6 +41,22 @@ in { default = [ ]; }; + aliases = { + user-aliases = mkOption { + type = attrsOf (listOf str); + description = + "Map of username to list of aliases mapping to that user."; + default = { }; + }; + + alias-users = mkOption { + type = attrsOf (listOf str); + description = + "Map of alias user to list of users who should receive email.."; + default = { }; + }; + }; + metrics-port = mkOption { type = port; description = "Port on which to serve metrics."; @@ -248,8 +264,8 @@ in { dns = cfg.blacklist.dns; }; aliases = { - user-aliases = cfg.user-aliases; - alias-users = cfg.alias-users; + user-aliases = cfg.aliases.user-aliases; + alias-users = cfg.aliases.alias-users; }; ssl = { certificate =