aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2021-02-13 15:16:56 +0100
committerIsmaël Bouya <ismael.bouya@normalesup.org>2021-02-13 15:16:56 +0100
commit68ff82c61628212208bc339b9f91fd1dba6ade50 (patch)
treee2bef90c35d0aa894a72842a05419e47656386f3 /modules
parentabd7458cbc97f9074f851f07f1f9145344b981ff (diff)
downloadNix-68ff82c61628212208bc339b9f91fd1dba6ade50.tar.gz
Nix-68ff82c61628212208bc339b9f91fd1dba6ade50.tar.zst
Nix-68ff82c61628212208bc339b9f91fd1dba6ade50.zip
Add CAA to dns
Diffstat (limited to 'modules')
-rw-r--r--modules/private/dns.nix3
-rw-r--r--modules/private/environment.nix1
2 files changed, 4 insertions, 0 deletions
diff --git a/modules/private/dns.nix b/modules/private/dns.nix
index ebced42..cb900ff 100644
--- a/modules/private/dns.nix
+++ b/modules/private/dns.nix
@@ -102,6 +102,9 @@
102 @ IN SOA ${soa.primary}. ${builtins.replaceStrings ["@"] ["."] soa.email}. ${soa.serial} ${soa.refresh} ${soa.retry} ${soa.expire} ${soa.ttl} 102 @ IN SOA ${soa.primary}. ${builtins.replaceStrings ["@"] ["."] soa.email}. ${soa.serial} ${soa.refresh} ${soa.retry} ${soa.expire} ${soa.ttl}
103 103
104 ${lib.concatStringsSep "\n" (map (x: "@ IN NS ${x}.") (lib.concatMap (n: lib.attrsets.mapAttrsToList (k: v: k) ns.${n}) conf.ns))} 104 ${lib.concatStringsSep "\n" (map (x: "@ IN NS ${x}.") (lib.concatMap (n: lib.attrsets.mapAttrsToList (k: v: k) ns.${n}) conf.ns))}
105 ${lib.optionalString (conf.withCAA != null) ''
106 ${conf.name}. IN CAA 0 issue "${conf.withCAA}"
107 ''}
105 108
106 ${conf.entries} 109 ${conf.entries}
107 110
diff --git a/modules/private/environment.nix b/modules/private/environment.nix
index 490a405..91e018d 100644
--- a/modules/private/environment.nix
+++ b/modules/private/environment.nix
@@ -401,6 +401,7 @@ in
401 type = listOf (submodule { 401 type = listOf (submodule {
402 options = { 402 options = {
403 name = mkOption { type = str; description = "zone name"; }; 403 name = mkOption { type = str; description = "zone name"; };
404 withCAA = mkOption { type = nullOr str; description = "CAA entry"; default = null; };
404 slaves = mkOption { 405 slaves = mkOption {
405 description = "NS slave groups of this zone"; 406 description = "NS slave groups of this zone";
406 type = listOf str; 407 type = listOf str;