1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-09-21 05:47:29 +02:00

files: fix activation under Nix 2.3

In Nix 2.3, all GC roots must be stored under `/nix/var/nix/gcroots`,
unless `--indirect` is specified. In Nix 2.4 and above, this flag is
ignored, because all GC roots created by `--add-root` are indirect.

Change-Id: I3eb3d7bc774af2ff336a2cdf312d30a99cdcb928
This commit is contained in:
V 2024-02-29 00:24:35 +01:00 committed by Mikilio
parent e6a96733c5
commit 2d44ac2a82
No known key found for this signature in database
GPG key ID: 5B2F1A890CF33F3F

View file

@ -274,7 +274,7 @@ in
run nix-env $VERBOSE_ARG --profile "$genProfilePath" --set "$newGenPath"
fi
run --quiet nix-store --realise "$newGenPath" --add-root "$newGenGcPath"
run --quiet nix-store --realise "$newGenPath" --add-root "$newGenGcPath" --indirect
if [[ -e "$legacyGenGcPath" ]]; then
run rm $VERBOSE_ARG "$legacyGenGcPath"
fi