diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-06-23 21:04:55 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-06-29 15:14:43 +0200 |
commit | a929614f94d11a4f397e72e74f38b3212c24cdee (patch) | |
tree | a81b3cee45586d685c1b7c6e5c39372f203aa00d /modules/private/mail/default.nix | |
parent | 53fa9f9e7d87835d6137a029fe80b3195e635797 (diff) | |
download | Nix-a929614f94d11a4f397e72e74f38b3212c24cdee.tar.gz Nix-a929614f94d11a4f397e72e74f38b3212c24cdee.tar.zst Nix-a929614f94d11a4f397e72e74f38b3212c24cdee.zip |
Configure mail (dovecot, postfix, spam checks)
Diffstat (limited to 'modules/private/mail/default.nix')
-rw-r--r-- | modules/private/mail/default.nix | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/modules/private/mail/default.nix b/modules/private/mail/default.nix new file mode 100644 index 0000000..ad2c684 --- /dev/null +++ b/modules/private/mail/default.nix | |||
@@ -0,0 +1,12 @@ | |||
1 | { lib, pkgs, config, myconfig, ... }: | ||
2 | { | ||
3 | config.security.acme.certs."mail" = config.services.myCertificates.certConfig // { | ||
4 | domain = "eldiron.immae.eu"; | ||
5 | extraDomains = let | ||
6 | zonesWithMx = builtins.filter (zone: | ||
7 | lib.attrsets.hasAttr "withEmail" zone && lib.lists.length zone.withEmail > 0 | ||
8 | ) myconfig.env.dns.masterZones; | ||
9 | mxs = map (zone: "mx-1.${zone.name}") zonesWithMx; | ||
10 | in builtins.listToAttrs (map (mx: lib.attrsets.nameValuePair mx null) mxs); | ||
11 | }; | ||
12 | } | ||