Merge pull request #242076 from Kranzes/nixtmpfilesd

nixos/nix-daemon: use tmpfiles from nixPackage when possible
This commit is contained in:
Ilan Joselevich
2023-07-07 23:53:27 +03:00
committed by GitHub

View File

@@ -168,13 +168,14 @@ in
systemd.packages = [ nixPackage ];
# Will only work once https://github.com/NixOS/nix/pull/6285 is merged
# systemd.tmpfiles.packages = [ nixPackage ];
# Can be dropped for Nix > https://github.com/NixOS/nix/pull/6285
systemd.tmpfiles.rules = [
"d /nix/var/nix/daemon-socket 0755 root root - -"
];
systemd.tmpfiles =
if (isNixAtLeast "2.8") then {
packages = [ nixPackage ];
} else {
rules = [
"d /nix/var/nix/daemon-socket 0755 root root - -"
];
};
systemd.sockets.nix-daemon.wantedBy = [ "sockets.target" ];