Merge pull request #244949 from FlafyDev/fix/nix-daemon-if

nixos/nix-daemon: change regular if to mkIf
This commit is contained in:
Ilan Joselevich 2023-07-23 16:02:33 +03:00 committed by GitHub
commit 383dc75dd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -168,14 +168,16 @@ in
systemd.packages = [ nixPackage ];
systemd.tmpfiles =
if (isNixAtLeast "2.8") then {
systemd.tmpfiles = mkMerge [
(mkIf (isNixAtLeast "2.8") {
packages = [ nixPackage ];
} else {
})
(mkIf (!isNixAtLeast "2.8") {
rules = [
"d /nix/var/nix/daemon-socket 0755 root root - -"
];
};
})
];
systemd.sockets.nix-daemon.wantedBy = [ "sockets.target" ];