diff options
author | nikstur <nikstur@outlook.com> | 2023-10-20 12:22:12 +0200 |
---|---|---|
committer | nikstur <nikstur@outlook.com> | 2023-10-26 01:44:21 +0200 |
commit | 256956e34d731087fa18227d3ae838b76389d5fd (patch) | |
tree | b40d4f5d844cd6bb604e98a66066b6175b5e97a2 /nixos/modules/system/activation/activation-script.nix | |
parent | d345b385fe3d9ca25f7148d8fa13061d36e3aa5b (diff) | |
download | nixpkgs-256956e34d731087fa18227d3ae838b76389d5fd.tar nixpkgs-256956e34d731087fa18227d3ae838b76389d5fd.tar.gz nixpkgs-256956e34d731087fa18227d3ae838b76389d5fd.tar.bz2 nixpkgs-256956e34d731087fa18227d3ae838b76389d5fd.tar.lz nixpkgs-256956e34d731087fa18227d3ae838b76389d5fd.tar.xz nixpkgs-256956e34d731087fa18227d3ae838b76389d5fd.tar.zst nixpkgs-256956e34d731087fa18227d3ae838b76389d5fd.zip |
nixos/activation: link gcroot with tmpfiles instead of in activation
Diffstat (limited to 'nixos/modules/system/activation/activation-script.nix')
-rw-r--r-- | nixos/modules/system/activation/activation-script.nix | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/nixos/modules/system/activation/activation-script.nix b/nixos/modules/system/activation/activation-script.nix index 424a9d17999..95b0c7bbd68 100644 --- a/nixos/modules/system/activation/activation-script.nix +++ b/nixos/modules/system/activation/activation-script.nix @@ -55,10 +55,6 @@ let # used as a garbage collection root. ln -sfn "$(readlink -f "$systemConfig")" /run/current-system - # Prevent the current configuration from being garbage-collected. - mkdir -p /nix/var/nix/gcroots - ln -sfn /run/current-system /nix/var/nix/gcroots/current-system - exit $_status ''; @@ -237,6 +233,9 @@ in system.activationScripts.specialfs = ""; # obsolete systemd.tmpfiles.rules = [ + # 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" ]; |