nixos/systemd-resolved: link resolv.conf to dynamic stub resolver

version as recommended by upstream (since systemd 236):
https://www.freedesktop.org/software/systemd/man/systemd-resolved.html#/etc/resolv.conf
This commit is contained in:
Florian Jacob 2018-11-13 19:05:30 +01:00
parent fd66e543ae
commit e80cdb2bac

View file

@ -260,9 +260,9 @@ in
'';
} // optionalAttrs config.services.resolved.enable {
# symlink the static version of resolv.conf as recommended by upstream:
# symlink the dynamic stub resolver 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";
"resolv.conf".source = "/run/systemd/resolve/stub-resolv.conf";
} // optionalAttrs (config.services.resolved.enable && dnsmasqResolve) {
"dnsmasq-resolv.conf".source = "/run/systemd/resolve/resolv.conf";
} // optionalAttrs (pkgs.stdenv.hostPlatform.libc == "glibc") {