aboutsummaryrefslogtreecommitdiff
path: root/nixops
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2019-04-10 01:58:03 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2019-04-10 01:58:03 +0200
commit42daa03b8af907a327b3a79302934ce98483c642 (patch)
tree60f6b830bf082297a593b5b0677732ac844d9261 /nixops
parent8a2ccf8489ff7b89d2b531665f6d87b470a34972 (diff)
downloadNix-42daa03b8af907a327b3a79302934ce98483c642.tar.gz
Nix-42daa03b8af907a327b3a79302934ce98483c642.tar.zst
Nix-42daa03b8af907a327b3a79302934ce98483c642.zip
Add eldiron MX info
Diffstat (limited to 'nixops')
-rw-r--r--nixops/modules/dns/default.nix3
1 files changed, 3 insertions, 0 deletions
diff --git a/nixops/modules/dns/default.nix b/nixops/modules/dns/default.nix
index 53d0ece..7937714 100644
--- a/nixops/modules/dns/default.nix
+++ b/nixops/modules/dns/default.nix
@@ -95,7 +95,9 @@
95 95
96 ${if lib.attrsets.hasAttr "withEmail" conf && lib.lists.length conf.withEmail > 0 then '' 96 ${if lib.attrsets.hasAttr "withEmail" conf && lib.lists.length conf.withEmail > 0 then ''
97 mail IN A ${myconfig.env.servers.immaeEu.ips.main.ip4} 97 mail IN A ${myconfig.env.servers.immaeEu.ips.main.ip4}
98 mx-1 IN A ${myconfig.env.servers.eldiron.ips.main.ip4}
98 ${builtins.concatStringsSep "\n" (map (i: "mail IN AAAA ${i}") myconfig.env.servers.immaeEu.ips.main.ip6)} 99 ${builtins.concatStringsSep "\n" (map (i: "mail IN AAAA ${i}") myconfig.env.servers.immaeEu.ips.main.ip6)}
100 ${builtins.concatStringsSep "\n" (map (i: "mx-1 IN AAAA ${i}") myconfig.env.servers.eldiron.ips.main.ip6)}
99 ${lib.concatStringsSep "\n\n" (map (e: 101 ${lib.concatStringsSep "\n\n" (map (e:
100 let 102 let
101 n = if e.domain == "" then "@" else "${e.domain} "; 103 n = if e.domain == "" then "@" else "${e.domain} ";
@@ -104,6 +106,7 @@
104 '' 106 ''
105 ; ------------------ mail: ${n} --------------------------- 107 ; ------------------ mail: ${n} ---------------------------
106 ${if e.receive then "${n} IN MX 10 mail.${conf.name}." else ""} 108 ${if e.receive then "${n} IN MX 10 mail.${conf.name}." else ""}
109 ${if e.receive then "${n} IN MX 50 mx-1.${conf.name}." else ""}
107 110
108 ; Mail sender authentications 111 ; Mail sender authentications
109 ${n} IN TXT "v=spf1 mx ~all" 112 ${n} IN TXT "v=spf1 mx ~all"