From 8e69e5e7710f74e884a1e5d3cf2010d44c46eb7f Mon Sep 17 00:00:00 2001 From: Romanos Skiadas Date: Thu, 15 Jul 2021 19:13:48 +0300 Subject: [PATCH] update GC pill to not mention gcroots/profiles This was removed in 2013 from nix v1.6. Don't point readers of the pills towards a link that no longer is there. fixes #105 --- pills/11-garbage-collector.xml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pills/11-garbage-collector.xml b/pills/11-garbage-collector.xml index a7bb1e1..2b7c85c 100644 --- a/pills/11-garbage-collector.xml +++ b/pills/11-garbage-collector.xml @@ -147,10 +147,11 @@ However we removed the link from /nix/var/nix/profiles, not from - /nix/var/nix/gcroots. Turns out, that - /nix/var/nix/gcroots/profiles is a symlink to - /nix/var/nix/profiles. That is very handy. It means - any profile and its generations are GC roots. + /nix/var/nix/gcroots. Turns out, Nix + also treats /nix/var/nix/profiles as a GC root. + That is very handy. It means any profile and its generations are GC roots. + There are other paths that are taken into account as well, for example /run/booted-system on NixOS. + The command nix-store --gc --print-roots prints all the paths considered before performing a GC.