summary refs log tree commit diff
path: root/nixos/modules/config
diff options
context:
space:
mode:
authorflorianjacob <accounts+github@florianjacob.de>2017-07-13 15:40:31 +0200
committerJörg Thalheim <Mic92@users.noreply.github.com>2017-07-13 14:40:31 +0100
commit9937f13308097210db9c9eaa61fadb73698fd475 (patch)
tree06e5599da970c308cb20f6af30d15eff996137a4 /nixos/modules/config
parentb14bcd873a193059223580d9cff1704788b33758 (diff)
downloadnixpkgs-9937f13308097210db9c9eaa61fadb73698fd475.tar
nixpkgs-9937f13308097210db9c9eaa61fadb73698fd475.tar.gz
nixpkgs-9937f13308097210db9c9eaa61fadb73698fd475.tar.bz2
nixpkgs-9937f13308097210db9c9eaa61fadb73698fd475.tar.lz
nixpkgs-9937f13308097210db9c9eaa61fadb73698fd475.tar.xz
nixpkgs-9937f13308097210db9c9eaa61fadb73698fd475.tar.zst
nixpkgs-9937f13308097210db9c9eaa61fadb73698fd475.zip
resolved: use resolved's static resolv.conf (#27144)
because it is upstream's recommended mode of operation:
https://www.freedesktop.org/software/systemd/man/systemd-resolved.html#/etc/resolv.conf
Diffstat (limited to 'nixos/modules/config')
-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 d503f5a8b20..cc967947dff 100644
--- a/nixos/modules/config/networking.nix
+++ b/nixos/modules/config/networking.nix
@@ -223,7 +223,9 @@ in
             '';
 
       } // optionalAttrs config.services.resolved.enable {
-        "resolv.conf".source = "/run/systemd/resolve/resolv.conf";
+        # symlink the static version of resolv.conf as recommended by upstream:
+        # https://www.freedesktop.org/software/systemd/man/systemd-resolved.html#/etc/resolv.conf
+        "resolv.conf".source = "${pkgs.systemd}/lib/systemd/resolv.conf";
       } // optionalAttrs (config.services.resolved.enable && dnsmasqResolve) {
         "dnsmasq-resolv.conf".source = "/run/systemd/resolve/resolv.conf";
       };