mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-11 20:25:32 +03:00
nixos/activation-script: only setup nix tmpfiles if nix is enabled
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
3d6e7d7b56
commit
c39781c558
1 changed files with 3 additions and 2 deletions
|
@ -234,11 +234,12 @@ in
|
|||
system.activationScripts.var = ""; # obsolete
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"D /var/empty 0555 root root -"
|
||||
"h /var/empty - - - - +i"
|
||||
] ++ lib.optionals config.nix.enable [
|
||||
# Prevent the current configuration from being garbage-collected.
|
||||
"d /nix/var/nix/gcroots -"
|
||||
"L+ /nix/var/nix/gcroots/current-system - - - - /run/current-system"
|
||||
"D /var/empty 0555 root root -"
|
||||
"h /var/empty - - - - +i"
|
||||
];
|
||||
|
||||
system.activationScripts.usrbinenv = if config.environment.usrbinenv != null
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue