about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2022-01-20 03:04:47 +0100
committerGitHub <noreply@github.com>2022-01-20 03:04:47 +0100
commitecebce40310f87ce59b20620e860b9ec2f5a7b62 (patch)
treeef1d0c8830c8692cc53a12b9a906bcf4c2cdeff9 /nixos
parent2647d4a9411447f0a2e80136d957973dc5a42a3c (diff)
parentc355b2729c01c4ea35a430dd6dfea9ae3848f816 (diff)
downloadnixlib-ecebce40310f87ce59b20620e860b9ec2f5a7b62.tar
nixlib-ecebce40310f87ce59b20620e860b9ec2f5a7b62.tar.gz
nixlib-ecebce40310f87ce59b20620e860b9ec2f5a7b62.tar.bz2
nixlib-ecebce40310f87ce59b20620e860b9ec2f5a7b62.tar.lz
nixlib-ecebce40310f87ce59b20620e860b9ec2f5a7b62.tar.xz
nixlib-ecebce40310f87ce59b20620e860b9ec2f5a7b62.tar.zst
nixlib-ecebce40310f87ce59b20620e860b9ec2f5a7b62.zip
Merge pull request #153075 from mattchrist/bind-forward-only
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/networking/bind.nix10
1 files changed, 9 insertions, 1 deletions
diff --git a/nixos/modules/services/networking/bind.nix b/nixos/modules/services/networking/bind.nix
index e44f8d4cf302..2045612ec054 100644
--- a/nixos/modules/services/networking/bind.nix
+++ b/nixos/modules/services/networking/bind.nix
@@ -59,7 +59,7 @@ let
         listen-on-v6 { ${concatMapStrings (entry: " ${entry}; ") cfg.listenOnIpv6} };
         allow-query { cachenetworks; };
         blackhole { badnetworks; };
-        forward first;
+        forward ${cfg.forward};
         forwarders { ${concatMapStrings (entry: " ${entry}; ") cfg.forwarders} };
         directory "${cfg.directory}";
         pid-file "/run/named/named.pid";
@@ -151,6 +151,14 @@ in
         ";
       };
 
+      forward = mkOption {
+        default = "first";
+        type = types.enum ["first" "only"];
+        description = "
+          Whether to forward 'first' (try forwarding but lookup directly if forwarding fails) or 'only'.
+        ";
+      };
+
       listenOn = mkOption {
         default = [ "any" ];
         type = types.listOf types.str;