From 9937f13308097210db9c9eaa61fadb73698fd475 Mon Sep 17 00:00:00 2001 From: florianjacob Date: Thu, 13 Jul 2017 15:40:31 +0200 Subject: [PATCH] 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 --- nixos/modules/config/networking.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nixos/modules/config/networking.nix b/nixos/modules/config/networking.nix index d503f5a8b20e..cc967947dffb 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"; };