initrd: use the new tmpfiles options to create tmpfiles config
Otherwise we get a clash when generating the initrd since the initrd tmpfiles options create a symlink at /etc/tmpfiles.d/ and any subsequent writes inside this directory because of initrd.systemd.contents will cause a permission denied error.
This commit is contained in:
@@ -205,11 +205,12 @@ in
|
|||||||
|
|
||||||
boot.initrd.systemd = {
|
boot.initrd.systemd = {
|
||||||
contents = {
|
contents = {
|
||||||
"/etc/tmpfiles.d/resolv.conf".text =
|
|
||||||
"L /etc/resolv.conf - - - - /run/systemd/resolve/stub-resolv.conf";
|
|
||||||
"/etc/systemd/resolved.conf".text = resolvedConf;
|
"/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"];
|
additionalUpstreamUnits = ["systemd-resolved.service"];
|
||||||
users.systemd-resolve = {};
|
users.systemd-resolve = {};
|
||||||
groups.systemd-resolve = {};
|
groups.systemd-resolve = {};
|
||||||
|
|||||||
Reference in New Issue
Block a user