https://nixos.org/nix/manual/#ssec-gc-roots mentions that /nix/var/nix/gcroots is the gcroot and that it is recursively following symlinks to find the store paths. However this behaviour was removed in aeb810b (why?)
We should probably update the documentation to reflect this. But I am confused for what reason this change was made in the first place.
It all started because I noticed that on my (new) system there is a symlink /nix/var/nix/gcroots/profiles -> /mnt/nix/var/nix/profiles (note the mnt) which is clearly an invalid symlink; yet nix-store --gc was still picking up paths in /nix/var/nix/profiles. I then git blame'd to discover that since recently /nix/var/nix/profiles is a direct gcroot and not an indirect one anymore.
So two questions in one:
- Why was this behaviour changed
- should we update the documentation?
- What part of the install process is creating this broken symlink to
/mnt/nix/var/nix/profiles ? Should we just remove that part of the install process because /nix/var/nix/profiles is a direct gcroot anyway?
https://nixos.org/nix/manual/#ssec-gc-roots mentions that
/nix/var/nix/gcrootsis thegcrootand that it is recursively following symlinks to find the store paths. However this behaviour was removed in aeb810b (why?)We should probably update the documentation to reflect this. But I am confused for what reason this change was made in the first place.
It all started because I noticed that on my (new) system there is a symlink
/nix/var/nix/gcroots/profiles -> /mnt/nix/var/nix/profiles(note themnt) which is clearly an invalid symlink; yetnix-store --gcwas still picking up paths in/nix/var/nix/profiles. I thengit blame'd to discover that since recently/nix/var/nix/profilesis a direct gcroot and not an indirect one anymore.So two questions in one:
/mnt/nix/var/nix/profiles? Should we just remove that part of the install process because/nix/var/nix/profilesis a direct gcroot anyway?