From a49408c4805ef7bf8061a4a3523a20d161c863e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Thu, 25 Apr 2024 20:04:38 +0200 Subject: [PATCH] dns: format --- nix/nixos-module/container/dns.nix | 44 ++++++++++++------------------ 1 file changed, 18 insertions(+), 26 deletions(-) diff --git a/nix/nixos-module/container/dns.nix b/nix/nixos-module/container/dns.nix index 0ffe18f..f2a51fc 100644 --- a/nix/nixos-module/container/dns.nix +++ b/nix/nixos-module/container/dns.nix @@ -178,15 +178,13 @@ in } ]; - zone = [ - { - acl = "zone_xfr"; - catalog-role = "generate"; - domain = "zentralwerk."; - notify = [ "ns1.supersandro.de" ]; - storage = "/var/lib/knot/catalog"; - } - ] ++ map generateZone config.site.dns.localZones; + zone = [ { + acl = "zone_xfr"; + catalog-role = "generate"; + domain = "zentralwerk."; + notify = [ "ns1.supersandro.de" ]; + storage = "/var/lib/knot/catalog"; + } ] ++ map generateZone config.site.dns.localZones; }; }); @@ -204,9 +202,7 @@ in cp ${generateZoneFile zone} /var/lib/knot/zones/${name}.zone chown -R knot /var/lib/knot/zones chmod -R u+rwX /var/lib/knot/zones - '') ( - builtins.filter ({ dynamic, ... }: dynamic) config.site.dns.localZones - )} + '') (builtins.filter ({ dynamic, ... }: dynamic) config.site.dns.localZones)} ''; }; @@ -216,22 +212,18 @@ in after = [ "knot.service" ]; serviceConfig.Type = "oneshot"; path = [ pkgs.dnsutils ]; - script = '' - ${lib.concatMapStrings (zone: '' - nsupdate -v -y "hmac-sha256:dyndns:${config.site.dyndnsKey}" <