From 23a021d12e8f939cd0bfddb1c7adeb125028c1e3 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Sat, 23 Sep 2017 16:36:05 +0200 Subject: [PATCH] Revert "nixos: add option for bind to not resolve local queries (#29503)" This reverts commit 670b4e29adc16e0a29aa5b4c126703dcca56aeb6. The change added in this commit was controversial when it was originally suggested in https://github.com/NixOS/nixpkgs/pull/29205. Then that PR was closed and a new one opened, https://github.com/NixOS/nixpkgs/pull/29503, effectively circumventing the review process. I don't agree with this modification. Adding an option 'resolveLocalQueries' to tell the locally running name server that it should resolve local DNS queries feels outright nuts. I agree that the current state is unsatisfactory and that it should be improved, but this is not the right way. --- nixos/modules/config/networking.nix | 4 +--- nixos/modules/services/networking/bind.nix | 9 --------- nixos/modules/services/networking/dnsmasq.nix | 2 +- nixos/modules/tasks/network-interfaces-scripted.nix | 2 +- 4 files changed, 3 insertions(+), 14 deletions(-) diff --git a/nixos/modules/config/networking.nix b/nixos/modules/config/networking.nix index 5fa91ec9cfbc..619f36cd5150 100644 --- a/nixos/modules/config/networking.nix +++ b/nixos/modules/config/networking.nix @@ -9,9 +9,7 @@ let cfg = config.networking; dnsmasqResolve = config.services.dnsmasq.enable && config.services.dnsmasq.resolveLocalQueries; - bindResolve = config.services.bind.enable && - config.services.bind.resolveLocalQueries; - hasLocalResolver = bindResolve || dnsmasqResolve; + hasLocalResolver = config.services.bind.enable || dnsmasqResolve; resolvconfOptions = cfg.resolvconfOptions ++ optional cfg.dnsSingleRequest "single-request" diff --git a/nixos/modules/services/networking/bind.nix b/nixos/modules/services/networking/bind.nix index 9f533eedf6e1..763283dfe7a2 100644 --- a/nixos/modules/services/networking/bind.nix +++ b/nixos/modules/services/networking/bind.nix @@ -151,15 +151,6 @@ in "; }; - resolveLocalQueries = mkOption { - type = types.bool; - default = true; - description = '' - Whether bind should resolve local queries (i.e. add 127.0.0.1 to - /etc/resolv.conf, overriding networking.nameserver). - ''; - }; - }; }; diff --git a/nixos/modules/services/networking/dnsmasq.nix b/nixos/modules/services/networking/dnsmasq.nix index 3d1b931de07e..fcf5aa5f175b 100644 --- a/nixos/modules/services/networking/dnsmasq.nix +++ b/nixos/modules/services/networking/dnsmasq.nix @@ -42,7 +42,7 @@ in default = true; description = '' Whether dnsmasq should resolve local queries (i.e. add 127.0.0.1 to - /etc/resolv.conf overriding networking.nameservers). + /etc/resolv.conf). ''; }; diff --git a/nixos/modules/tasks/network-interfaces-scripted.nix b/nixos/modules/tasks/network-interfaces-scripted.nix index adc048f3ca2c..7ede8752bcc3 100644 --- a/nixos/modules/tasks/network-interfaces-scripted.nix +++ b/nixos/modules/tasks/network-interfaces-scripted.nix @@ -105,7 +105,7 @@ let '' # Set the static DNS configuration, if given. ${pkgs.openresolv}/sbin/resolvconf -m 1 -a static <