summaryrefslogtreecommitdiff
path: root/hosts/surtr/dns/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'hosts/surtr/dns/default.nix')
-rw-r--r--hosts/surtr/dns/default.nix12
1 files changed, 5 insertions, 7 deletions
diff --git a/hosts/surtr/dns/default.nix b/hosts/surtr/dns/default.nix
index fbfec256..e79f4bfb 100644
--- a/hosts/surtr/dns/default.nix
+++ b/hosts/surtr/dns/default.nix
@@ -24,7 +24,7 @@ let
24 indentString = indentation: str: concatMapStringsSep "\n" (str: " ${str}") (splitString "\n" (removeSuffix "\n" str)); 24 indentString = indentation: str: concatMapStringsSep "\n" (str: " ${str}") (splitString "\n" (removeSuffix "\n" str));
25 25
26 mkZone = {domain, path ? (./zones + "/${reverseDomain domain}.soa"), acmeDomains ? [domain], addACLs ? {}}: indentString " " (let 26 mkZone = {domain, path ? (./zones + "/${reverseDomain domain}.soa"), acmeDomains ? [domain], addACLs ? {}}: indentString " " (let
27 keys = acmeDomain: [(assert (config.sops.secrets ? "${acmeDomain}_acme.yaml"); "${acmeDomain}_acme_acl")] ++ (addACLs.${acmeDomain} or []); 27 keys = acmeDomain: [(assert (config.sops.secrets ? "${acmeDomain}_acme"); "${acmeDomain}_acme_acl")] ++ (addACLs.${acmeDomain} or []);
28 in '' 28 in ''
29 - domain: ${domain} 29 - domain: ${domain}
30 template: inwx_zone 30 template: inwx_zone
@@ -79,13 +79,11 @@ in {
79 update-type: DS 79 update-type: DS
80 ${let 80 ${let
81 toACMEACL = { name, ... }: 81 toACMEACL = { name, ... }:
82 if hasSuffix "_acme.yaml" name 82 if hasSuffix "_acme" name
83 then 83 then
84 let 84 indentString " " ''
85 base = removeSuffix ".yaml" name; 85 - id: ${name}_acl
86 in indentString " " '' 86 key: ${name}_key
87 - id: ${base}_acl
88 key: ${base}_key
89 action: update 87 action: update
90 '' 88 ''
91 else null; 89 else null;