forked from mirrors/nixpkgs
Revert "nixos: add option for bind to not resolve local queries (#29503)"
This reverts commit 670b4e29ad
. 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.
This commit is contained in:
parent
f7411b81ed
commit
23a021d12e
|
@ -9,9 +9,7 @@ let
|
||||||
cfg = config.networking;
|
cfg = config.networking;
|
||||||
dnsmasqResolve = config.services.dnsmasq.enable &&
|
dnsmasqResolve = config.services.dnsmasq.enable &&
|
||||||
config.services.dnsmasq.resolveLocalQueries;
|
config.services.dnsmasq.resolveLocalQueries;
|
||||||
bindResolve = config.services.bind.enable &&
|
hasLocalResolver = config.services.bind.enable || dnsmasqResolve;
|
||||||
config.services.bind.resolveLocalQueries;
|
|
||||||
hasLocalResolver = bindResolve || dnsmasqResolve;
|
|
||||||
|
|
||||||
resolvconfOptions = cfg.resolvconfOptions
|
resolvconfOptions = cfg.resolvconfOptions
|
||||||
++ optional cfg.dnsSingleRequest "single-request"
|
++ optional cfg.dnsSingleRequest "single-request"
|
||||||
|
|
|
@ -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).
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -42,7 +42,7 @@ in
|
||||||
default = true;
|
default = true;
|
||||||
description = ''
|
description = ''
|
||||||
Whether dnsmasq should resolve local queries (i.e. add 127.0.0.1 to
|
Whether dnsmasq should resolve local queries (i.e. add 127.0.0.1 to
|
||||||
/etc/resolv.conf overriding networking.nameservers).
|
/etc/resolv.conf).
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -105,7 +105,7 @@ let
|
||||||
''
|
''
|
||||||
# Set the static DNS configuration, if given.
|
# Set the static DNS configuration, if given.
|
||||||
${pkgs.openresolv}/sbin/resolvconf -m 1 -a static <<EOF
|
${pkgs.openresolv}/sbin/resolvconf -m 1 -a static <<EOF
|
||||||
${optionalString (cfg.domain != null) ''
|
${optionalString (cfg.nameservers != [] && cfg.domain != null) ''
|
||||||
domain ${cfg.domain}
|
domain ${cfg.domain}
|
||||||
''}
|
''}
|
||||||
${optionalString (cfg.search != []) ("search " + concatStringsSep " " cfg.search)}
|
${optionalString (cfg.search != []) ("search " + concatStringsSep " " cfg.search)}
|
||||||
|
|
Loading…
Reference in a new issue