From 859267f627aefa12a9180e1c821fa4fbed7ed188 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Wed, 31 May 2017 22:34:06 +0100 Subject: [PATCH] systemd-resolved: fix case when dnsmasq is used as local resolver fixes #25706 --- nixos/modules/config/networking.nix | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/nixos/modules/config/networking.nix b/nixos/modules/config/networking.nix index ae30a710bf6..d503f5a8b20 100644 --- a/nixos/modules/config/networking.nix +++ b/nixos/modules/config/networking.nix @@ -222,13 +222,11 @@ in '' + cfg.extraResolvconfConf + '' ''; - } // (optionalAttrs config.services.resolved.enable ( - if dnsmasqResolve then { - "dnsmasq-resolv.conf".source = "/run/systemd/resolve/resolv.conf"; - } else { - "resolv.conf".source = "/run/systemd/resolve/resolv.conf"; - } - )); + } // optionalAttrs config.services.resolved.enable { + "resolv.conf".source = "/run/systemd/resolve/resolv.conf"; + } // optionalAttrs (config.services.resolved.enable && dnsmasqResolve) { + "dnsmasq-resolv.conf".source = "/run/systemd/resolve/resolv.conf"; + }; networking.proxy.envVars = optionalAttrs (cfg.proxy.default != null) {