There is no zoneCfg
This commit is contained in:
parent
3baca55746
commit
3244b2d821
|
@ -76,9 +76,8 @@ in {
|
||||||
stateDirectory = cfg.state-directory;
|
stateDirectory = cfg.state-directory;
|
||||||
zones = mapAttrs' (dom: domCfg:
|
zones = mapAttrs' (dom: domCfg:
|
||||||
nameValuePair "${dom}." {
|
nameValuePair "${dom}." {
|
||||||
dnssec = zoneCfg.ksk.key-file != null;
|
dnssec = domCfg.ksk.key-file != null;
|
||||||
ksk.keyFile =
|
ksk.keyFile = mkIf (domCfg.ksk.key-file != null) domCfg.ksk.key-file;
|
||||||
mkIf (zoneCfg.ksk.key-file != null) zoneCfg.ksk.key-file;
|
|
||||||
data = let content = zoneToZonefile cfg.timestamp dom domCfg.zone;
|
data = let content = zoneToZonefile cfg.timestamp dom domCfg.zone;
|
||||||
in trace content content;
|
in trace content content;
|
||||||
}) cfg.domains;
|
}) cfg.domains;
|
||||||
|
|
10
nsd.nix
10
nsd.nix
|
@ -24,6 +24,11 @@ let
|
||||||
|
|
||||||
maybeConfig = prefix: x: if x == null then "" else ''${prefix} "${x}"'';
|
maybeConfig = prefix: x: if x == null then "" else ''${prefix} "${x}"'';
|
||||||
|
|
||||||
|
yesOrNo = b: if b then "yes" else "no";
|
||||||
|
maybeToString = prefix: x:
|
||||||
|
if x == null then "" else "${prefix} ${toString x}";
|
||||||
|
forEach = pre: l: concatMapStrings (x: pre + x + "\n") l;
|
||||||
|
|
||||||
mkZoneFileName = name: if name == "." then "root" else name;
|
mkZoneFileName = name: if name == "." then "root" else name;
|
||||||
|
|
||||||
# replaces include: directives for keys with fake keys for nsd-checkconf
|
# replaces include: directives for keys with fake keys for nsd-checkconf
|
||||||
|
@ -142,11 +147,6 @@ let
|
||||||
${cfg.extraConfig}
|
${cfg.extraConfig}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
yesOrNo = b: if b then "yes" else "no";
|
|
||||||
maybeToString = prefix: x:
|
|
||||||
if x == null then "" else "${prefix} ${toString x}";
|
|
||||||
forEach = pre: l: concatMapStrings (x: pre + x + "\n") l;
|
|
||||||
|
|
||||||
keyConfigFile = concatStrings (mapAttrsToList (keyName: keyOptions: ''
|
keyConfigFile = concatStrings (mapAttrsToList (keyName: keyOptions: ''
|
||||||
key:
|
key:
|
||||||
name: "${keyName}"
|
name: "${keyName}"
|
||||||
|
|
Loading…
Reference in New Issue