mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-01 01:33:20 +00:00
nixos/tmpfiles: only setup nix tmpfiles when nix is used
If nix is not installed on the end system, the tmpfiles settings related to it do not need to be setup.
This commit is contained in:
parent
c1baeb8d14
commit
3d6e7d7b56
@ -281,15 +281,19 @@ in
|
||||
) cfg.settings);
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"d /nix/var 0755 root root - -"
|
||||
"L+ /nix/var/nix/gcroots/booted-system 0755 root root - /run/booted-system"
|
||||
"d /run/lock 0755 root root - -"
|
||||
"d /var/db 0755 root root - -"
|
||||
"L /var/lock - - - - ../run/lock"
|
||||
# Boot-time cleanup
|
||||
] ++ lib.optionals config.nix.enable [
|
||||
"d /nix/var 0755 root root - -"
|
||||
"L+ /nix/var/nix/gcroots/booted-system 0755 root root - /run/booted-system"
|
||||
]
|
||||
# Boot-time cleanup
|
||||
++ [
|
||||
"R! /etc/group.lock - - - - -"
|
||||
"R! /etc/passwd.lock - - - - -"
|
||||
"R! /etc/shadow.lock - - - - -"
|
||||
] ++ lib.optionals config.nix.enable [
|
||||
"R! /nix/var/nix/gcroots/tmp - - - - -"
|
||||
"R! /nix/var/nix/temproots - - - - -"
|
||||
];
|
||||
|
Loading…
Reference in New Issue
Block a user