It's not even getting to zoneToZonefile...

This commit is contained in:
niten 2023-10-05 11:49:21 -07:00
parent af81439530
commit b99c7cf8ee
3 changed files with 12 additions and 7 deletions

View File

@ -6,6 +6,8 @@ let
zoneOpts = import ./zone-definition.nix { inherit lib; };
zoneToZonefile = import ./zone-to-zonefile.nix { inherit lib; };
domainOpts = { name, ... }: {
options = with types; {
domain = mkOption {
@ -75,9 +77,13 @@ in {
zones = mapAttrs' (dom: domCfg:
let zoneCfg = domCfg.zone;
in nameValuePair "${dom}." {
dnssec = domCfg.ksk.key-file != null;
ksk.keyFile = domCfg.ksk.key-file;
data = zoneToZonefile cfg.timestamp dom domCfg.zone-definition;
dnssec = zoneCfg.ksk.key-file != null;
ksk.keyFile =
mkIf (zoneCfg.ksk.key-file != null) zoneCfg.ksk.key-file;
data = let
content = zoneToZonefile cfg.timestamp dom domCfg.zone-definition;
in trace content content;
}) cfg.domains;
};
};

View File

@ -167,7 +167,7 @@ let
zone:
name: "${name}"
zonefile: "${stateDir}/zones/${mkZoneFileName name}"
${maybeConfig "outgoing-interface: " zone.outgoingInterface}
${forEach " rrl-whitelist: " zone.rrlWhitelist}
${maybeConfig "zonestats: " zone.zoneStats}

View File

@ -1,9 +1,8 @@
{ config, lib, pkgs, ... }:
with lib;
{ lib, ... }:
{ timestamp, domain, zone, ... }:
with lib;
let
removeBlankLines = str:
concatStringsSep "\n\n" (filter isString (split ''