Take a list of domains for which we're secondary
This commit is contained in:
parent
3035662910
commit
1671cece1c
@ -94,6 +94,12 @@ in {
|
|||||||
"Map of IP address to authoritative hostname. Unneeded hosts will be ignored.";
|
"Map of IP address to authoritative hostname. Unneeded hosts will be ignored.";
|
||||||
default = { };
|
default = { };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
mirrored-domains = mkOption {
|
||||||
|
type = attrsOf str;
|
||||||
|
description = "Map of domain name to primary server IP.";
|
||||||
|
default = { };
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
imports = [ ./nsd.nix ];
|
imports = [ ./nsd.nix ];
|
||||||
@ -129,6 +135,10 @@ in {
|
|||||||
ipHostMap = cfg.ip-host-map;
|
ipHostMap = cfg.ip-host-map;
|
||||||
serial = cfg.timestamp;
|
serial = cfg.timestamp;
|
||||||
}) reverse-zones)) cfg.domains;
|
}) reverse-zones)) cfg.domains;
|
||||||
|
secondaryZones = mapAttrs (domain: masterIp: {
|
||||||
|
allowNotify = "${masterIp}/32";
|
||||||
|
requestXFR = "AXFR ${masterIp} NOKEY";
|
||||||
|
}) cfg.mirrored-domains;
|
||||||
in forwardZones // reverseZones;
|
in forwardZones // reverseZones;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user