summaryrefslogtreecommitdiffstats
path: root/nixos/modules/config/networking.nix
diff options
context:
space:
mode:
authorJörg Thalheim <joerg@thalheim.io>2017-05-31 22:34:06 +0100
committerJörg Thalheim <joerg@thalheim.io>2017-05-31 23:30:35 +0100
commit859267f627aefa12a9180e1c821fa4fbed7ed188 (patch)
treef7746dba0d5951e295502335ebbd8d035f6a41de /nixos/modules/config/networking.nix
parent5604dbe8785c607dbdbc35ade531194e82ca3f3e (diff)
systemd-resolved: fix case when dnsmasq is used as local resolver
fixes #25706
Diffstat (limited to 'nixos/modules/config/networking.nix')
-rw-r--r--nixos/modules/config/networking.nix12
1 files changed, 5 insertions, 7 deletions
diff --git a/nixos/modules/config/networking.nix b/nixos/modules/config/networking.nix
index ae30a710bf6f..d503f5a8b20e 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) {