git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #72987 from rnhmjoj/dnschain

nixos/dnschain: use forwardZonesRecurse in pdns-recursor

commite37e7b413c8ff7803c6a8194f00ec85f48ad1db8 authorRenaud <c0bw3b@users.noreply.github.com> dateFri 29 Nov 2019, 19:56 (7 years ago) parentfcd0ea338d5734
2 files changed+12−3
nixos/modules/services/networking/dnschain.nix+1−1 nixos/modules/services/networking/pdns-recursor.nix+11−2
nixos/modules/services/networking/dnschain.nix+1−1
@@ -137,7 +137,7 @@ in
137137 ];
138138
139139 services.pdns-recursor = mkIf cfgs.pdns-recursor.resolveDNSChainQueries {
140− forwardZones =
140+ forwardZonesRecurse =
141141 { bit = "127.0.0.1:${toString cfg.dns.port}";
142142 dns = "127.0.0.1:${toString cfg.dns.port}";
143143 };
nixos/modules/services/networking/pdns-recursor.nix+11−2
@@ -90,11 +90,19 @@ in {
9090 };
9191
9292 forwardZones = mkOption {
93+ type = types.attrs;
94+ default = {};
95+ description = ''
96+ DNS zones to be forwarded to other authoritative servers.
97+ '';
98+ };
99+
100+ forwardZonesRecurse = mkOption {
93101 type = types.attrs;
94102 example = { eth = "127.0.0.1:5353"; };
95103 default = {};
96104 description = ''
97− DNS zones to be forwarded to other servers.
105+ DNS zones to be forwarded to other recursive servers.
98106 '';
99107 };
100108
@@ -158,7 +166,8 @@ in {
158166 webserver-port = cfg.api.port;
159167 webserver-allow-from = cfg.api.allowFrom;
160168
161− forward-zones = mapAttrsToList (zone: uri: "${zone}.=${uri}") cfg.forwardZones;
169+ forward-zones = mapAttrsToList (zone: uri: "${zone}.=${uri}") cfg.forwardZones;
170+ forward-zones-recurse = mapAttrsToList (zone: uri: "${zone}.=${uri}") cfg.forwardZonesRecurse;
162171 export-etc-hosts = cfg.exportHosts;
163172 dnssec = cfg.dnssecValidation;
164173 serve-rfc1918 = cfg.serveRFC1918;