Unverified Commit d5585542 authored by r-vdp's avatar r-vdp
Browse files

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.
parent a46a1555
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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 = {};