Merge pull request #302608 from nbdd0121/dns

nixos/resolvconf: fix useLocalResolver when IPv6 is enabled
This commit is contained in:
Janik 2024-04-12 21:59:42 +02:00 committed by GitHub
commit aeeedb0b60
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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