about summary refs log tree commit diff
path: root/nixos/modules/config/resolvconf.nix
diff options
context:
space:
mode:
authorJanik <80165193+Janik-Haag@users.noreply.github.com>2024-04-12 21:59:42 +0200
committerGitHub <noreply@github.com>2024-04-12 21:59:42 +0200
commitaeeedb0b60ea5b861ce0f30686616aa54fdf643e (patch)
tree078165fa166a3dbc06a47d0f48c0a4c4777d3a93 /nixos/modules/config/resolvconf.nix
parentbf696414816154fc0034ca3948d5a4367f1bafd5 (diff)
parenteb91bc05bd9ded4807a42255820a03b61d1f3f21 (diff)
Merge pull request #302608 from nbdd0121/dns
nixos/resolvconf: fix useLocalResolver when IPv6 is enabled
Diffstat (limited to 'nixos/modules/config/resolvconf.nix')
-rw-r--r--nixos/modules/config/resolvconf.nix4
1 files changed, 1 insertions, 3 deletions
diff --git a/nixos/modules/config/resolvconf.nix b/nixos/modules/config/resolvconf.nix
index e52b90c037a83..8a58b218f867b 100644
--- a/nixos/modules/config/resolvconf.nix
+++ b/nixos/modules/config/resolvconf.nix
@@ -28,9 +28,7 @@ let
       resolv_conf_options='${concatStringsSep " " resolvconfOptions}'
     '' + optionalString cfg.useLocalResolver ''
       # This hosts runs a full-blown DNS resolver.
-      name_servers='127.0.0.1'
-    '' + optionalString (cfg.useLocalResolver && config.networking.enableIPv6) ''
-      name_servers='::1'
+      name_servers='127.0.0.1${optionalString config.networking.enableIPv6 " ::1"}'
     '' + cfg.extraConfig;
 
 in