nixos/nix-daemon: change regular if to mkIf
This commit is contained in:
parent
12303c652b
commit
519a71edc3
1 changed files with 6 additions and 4 deletions
|
@ -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" ];
|
||||
|
||||
|
|
Loading…
Reference in a new issue