diff options
author | Ilan Joselevich <personal@ilanjoselevich.com> | 2023-07-07 17:29:05 +0300 |
---|---|---|
committer | Ilan Joselevich <personal@ilanjoselevich.com> | 2023-07-07 17:29:05 +0300 |
commit | af8206f8011d8568d34d19428e288b7ebaa4d36b (patch) | |
tree | 186ed05cbccb5edc61b6568281ffa16a8528d393 /nixos | |
parent | 73d174c62ba412c79358895282b6ecee9497469a (diff) |
nixos/nix-daemon: use tmpfiles from nixPackage when possible
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/system/nix-daemon.nix | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/nixos/modules/services/system/nix-daemon.nix b/nixos/modules/services/system/nix-daemon.nix index ad86a567b7af6..0d6bec888395e 100644 --- a/nixos/modules/services/system/nix-daemon.nix +++ b/nixos/modules/services/system/nix-daemon.nix @@ -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" ]; |