nixos/nix-daemon: change regular if to mkIf

This commit is contained in:
FlafyDev 2023-07-23 04:16:04 +03:00
parent 12303c652b
commit 519a71edc3

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" ];