@@ -71,6 +71,7 @@ let
7171 # interfaces
7272 ${forEach " ip-address: " cfg.interfaces}
7373
74+ ip-freebind: ${yesOrNo cfg.ipFreebind}
7475 hide-version: ${yesOrNo cfg.hideVersion}
7576 identity: "${cfg.identity}"
7677 ip-transparent: ${yesOrNo cfg.ipTransparent}
@@ -84,7 +85,7 @@ let
8485 reuseport: ${yesOrNo cfg.reuseport}
8586 round-robin: ${yesOrNo cfg.roundRobin}
8687 server-count: ${toString cfg.serverCount}
87− ${if cfg.statistics == null then "" else "statistics: ${toString cfg.statistics}"}
88+ ${maybeToString "statistics: " cfg.statistics}
8889 tcp-count: ${toString cfg.tcpCount}
8990 tcp-query-count: ${toString cfg.tcpQueryCount}
9091 tcp-timeout: ${toString cfg.tcpTimeout}
@@ -117,7 +118,8 @@ let
117118 '';
118119
119120 yesOrNo = b: if b then "yes" else "no";
120− maybeString = pre: s: if s == null then "" else ''${pre} "${s}"'';
121+ maybeString = prefix: x: if x == null then "" else ''${prefix} "${s}"'';
122+ maybeToString = prefix: x: if x == null then "" else ''${prefix} ${toString s}'';
121123 forEach = pre: l: concatMapStrings (x: pre + x + "\n") l;
122124
123125
@@ -146,6 +148,11 @@ let
146148 ${forEach " rrl-whitelist: " zone.rrlWhitelist}
147149 ${maybeString "zonestats: " zone.zoneStats}
148150
151+ ${maybeToString "max-refresh-time: " zone.maxRefreshSecs}
152+ ${maybeToString "min-refresh-time: " zone.minRefreshSecs}
153+ ${maybeToString "max-retry-time: " zone.maxRetrySecs}
154+ ${maybeToString "min-retry-time: " zone.minRetrySecs}
155+
149156 allow-axfr-fallback: ${yesOrNo zone.allowAXFRFallback}
150157 ${forEach " allow-notify: " zone.allowNotify}
151158 ${forEach " request-xfr: " zone.requestXFR}
@@ -241,6 +248,44 @@ let
241248 '';
242249 };
243250
251+ maxRefreshSecs = mkOption {
252+ type = types.nullOr types.int;
253+ default = null;
254+ description = ''
255+ Limit refresh time for secondary zones. This is the timer which
256+ checks to see if the zone has to be refetched when it expires.
257+ Normally the value from the SOA record is used, but this option
258+ restricts that value.
259+ '';
260+ };
261+
262+ minRefreshSecs = mkOption {
263+ type = types.nullOr types.int;
264+ default = null;
265+ description = ''
266+ Limit refresh time for secondary zones.
267+ '';
268+ };
269+
270+ maxRetrySecs = mkOption {
271+ type = types.nullOr types.int;
272+ default = null;
273+ description = ''
274+ Limit retry time for secondary zones. This is the timeout after
275+ a failed fetch attempt for the zone. Normally the value from
276+ the SOA record is used, but this option restricts that value.
277+ '';
278+ };
279+
280+ minRetrySecs = mkOption {
281+ type = types.nullOr types.int;
282+ default = null;
283+ description = ''
284+ Limit retry time for secondary zones.
285+ '';
286+ };
287+
288+
244289 notify = mkOption {
245290 type = types.listOf types.str;
246291 default = [];
@@ -366,6 +411,15 @@ in
366411 '';
367412 };
368413
414+ ipFreebind = mkOption {
415+ type = types.bool;
416+ default = false;
417+ description = ''
418+ Whether to bind to nonlocal addresses and interfaces that are down.
419+ Similar to ip-transparent.
420+ '';
421+ };
422+
369423 ipTransparent = mkOption {
370424 type = types.bool;
371425 default = false;