diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2023-01-30 12:20:23 +0100 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2023-01-30 12:20:23 +0100 |
commit | cfc871cce6aefaa0ff64619780a807cba761c6b2 (patch) | |
tree | 965e8276ed36f11698b6c7d6eadab9f88d5f97c5 /hosts/surtr/dns/default.nix | |
parent | aa54fe89b98d354d21141c589332ce7950ef2e59 (diff) | |
download | nixos-cfc871cce6aefaa0ff64619780a807cba761c6b2.tar nixos-cfc871cce6aefaa0ff64619780a807cba761c6b2.tar.gz nixos-cfc871cce6aefaa0ff64619780a807cba761c6b2.tar.bz2 nixos-cfc871cce6aefaa0ff64619780a807cba761c6b2.tar.xz nixos-cfc871cce6aefaa0ff64619780a807cba761c6b2.zip |
...
Diffstat (limited to 'hosts/surtr/dns/default.nix')
-rw-r--r-- | hosts/surtr/dns/default.nix | 12 |
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; |