diff --git a/nixos/modules/system/boot/resolved.nix b/nixos/modules/system/boot/resolved.nix index b658a7a2dc05..65c00b694e0f 100644 --- a/nixos/modules/system/boot/resolved.nix +++ b/nixos/modules/system/boot/resolved.nix @@ -205,11 +205,12 @@ in boot.initrd.systemd = { contents = { - "/etc/tmpfiles.d/resolv.conf".text = - "L /etc/resolv.conf - - - - /run/systemd/resolve/stub-resolv.conf"; "/etc/systemd/resolved.conf".text = resolvedConf; }; + tmpfiles.settings.systemd-resolved-stub."/etc/resolv.conf".L.argument = + "/run/systemd/resolve/stub-resolv.conf"; + additionalUpstreamUnits = ["systemd-resolved.service"]; users.systemd-resolve = {}; groups.systemd-resolve = {};