From cfc871cce6aefaa0ff64619780a807cba761c6b2 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 30 Jan 2023 12:20:23 +0100 Subject: ... --- hosts/surtr/dns/default.nix | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'hosts/surtr/dns/default.nix') 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 indentString = indentation: str: concatMapStringsSep "\n" (str: " ${str}") (splitString "\n" (removeSuffix "\n" str)); mkZone = {domain, path ? (./zones + "/${reverseDomain domain}.soa"), acmeDomains ? [domain], addACLs ? {}}: indentString " " (let - keys = acmeDomain: [(assert (config.sops.secrets ? "${acmeDomain}_acme.yaml"); "${acmeDomain}_acme_acl")] ++ (addACLs.${acmeDomain} or []); + keys = acmeDomain: [(assert (config.sops.secrets ? "${acmeDomain}_acme"); "${acmeDomain}_acme_acl")] ++ (addACLs.${acmeDomain} or []); in '' - domain: ${domain} template: inwx_zone @@ -79,13 +79,11 @@ in { update-type: DS ${let toACMEACL = { name, ... }: - if hasSuffix "_acme.yaml" name + if hasSuffix "_acme" name then - let - base = removeSuffix ".yaml" name; - in indentString " " '' - - id: ${base}_acl - key: ${base}_key + indentString " " '' + - id: ${name}_acl + key: ${name}_key action: update '' else null; -- cgit v1.2.3