git.iko.soy/typeable/nixpkgs
on master help sign in
bind service: add listen-on options (#26430)

This adds configuration options for the bind package so that the interfaces that bind listens on can be configured rather than just hardcoded as any. The default values preserve the old behavior to be backwards compatible.

commitbb6cf349ffd5c15e364d551bcabec20c9e675bdc authorDavid Tulig <david.tulig@gmail.com> dateSat 10 Jun 2017, 04:19 (9 years ago) parent333dc53
1 file changed+18−2
nixos/modules/services/networking/bind.nix+18−2
nixos/modules/services/networking/bind.nix+18−2
@@ -14,8 +14,8 @@ let
1414 acl badnetworks { ${concatMapStrings (entry: " ${entry}; ") cfg.blockedNetworks} };
1515
1616 options {
17− listen-on {any;};
18− listen-on-v6 {any;};
17+ listen-on { ${concatMapStrings (entry: " ${entry}; ") cfg.listenOn} };
18+ listen-on-v6 { ${concatMapStrings (entry: " ${entry}; ") cfg.listenOnIpv6} };
1919 allow-query { cachenetworks; };
2020 blackhole { badnetworks; };
2121 forward first;
@@ -96,6 +96,22 @@ in
9696 ";
9797 };
9898
99+ listenOn = mkOption {
100+ default = ["any"];
101+ type = types.listOf types.str;
102+ description = "
103+ Interfaces to listen on.
104+ ";
105+ };
106+
107+ listenOnIpv6 = mkOption {
108+ default = ["any"];
109+ type = types.listOf types.str;
110+ description = "
111+ Ipv6 interfaces to listen on.
112+ ";
113+ };
114+
99115 zones = mkOption {
100116 default = [];
101117 description = "