summary refs log tree commit diff
path: root/nixos/modules/config/networking.nix
diff options
context:
space:
mode:
authorAlexander Shpilkin <ashpilkin@gmail.com>2018-07-23 16:26:03 +0200
committerAlexander Shpilkin <ashpilkin@gmail.com>2018-07-23 16:26:03 +0200
commit81fa1ceeee3b21e1d20e40f924a05fc1bb58e16c (patch)
treed9f854a17d6e85a4d4e882976eb3f4144ce6ff3e /nixos/modules/config/networking.nix
parentdae9cf6106da19f79a39714f183ed253c62b32c5 (diff)
downloadnixlib-81fa1ceeee3b21e1d20e40f924a05fc1bb58e16c.tar
nixlib-81fa1ceeee3b21e1d20e40f924a05fc1bb58e16c.tar.gz
nixlib-81fa1ceeee3b21e1d20e40f924a05fc1bb58e16c.tar.bz2
nixlib-81fa1ceeee3b21e1d20e40f924a05fc1bb58e16c.tar.lz
nixlib-81fa1ceeee3b21e1d20e40f924a05fc1bb58e16c.tar.xz
nixlib-81fa1ceeee3b21e1d20e40f924a05fc1bb58e16c.tar.zst
nixlib-81fa1ceeee3b21e1d20e40f924a05fc1bb58e16c.zip
nixos/networking: include local Unbound in resolv.conf
Previously, only BIND, dnsmasq and resolved were included in
resolv.conf. Recognize an Unbound installation as well.
Diffstat (limited to 'nixos/modules/config/networking.nix')
-rw-r--r--nixos/modules/config/networking.nix4
1 files changed, 3 insertions, 1 deletions
diff --git a/nixos/modules/config/networking.nix b/nixos/modules/config/networking.nix
index 48c3b41bc091..1ef5313d3fdd 100644
--- a/nixos/modules/config/networking.nix
+++ b/nixos/modules/config/networking.nix
@@ -9,7 +9,9 @@ let
   cfg = config.networking;
   dnsmasqResolve = config.services.dnsmasq.enable &&
                    config.services.dnsmasq.resolveLocalQueries;
-  hasLocalResolver = config.services.bind.enable || dnsmasqResolve;
+  hasLocalResolver = config.services.bind.enable ||
+                     config.services.unbound.enable ||
+                     dnsmasqResolve;
 
   resolvconfOptions = cfg.resolvconfOptions
     ++ optional cfg.dnsSingleRequest "single-request"