From a17f377f69c33e5aa553a9098974af7972f2662f Mon Sep 17 00:00:00 2001 From: Elliot Cameron <130508846+de11n@users.noreply.github.com> Date: Thu, 10 Jul 2025 16:19:43 -0400 Subject: [PATCH] Fix documentation for GC w.r.t. symlinks --- .../source/package-management/garbage-collector-roots.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/manual/source/package-management/garbage-collector-roots.md b/doc/manual/source/package-management/garbage-collector-roots.md index 30c5b7f8d..925a33162 100644 --- a/doc/manual/source/package-management/garbage-collector-roots.md +++ b/doc/manual/source/package-management/garbage-collector-roots.md @@ -12,7 +12,7 @@ $ ln -s /nix/store/d718ef...-foo /nix/var/nix/gcroots/bar That is, after this command, the garbage collector will not remove `/nix/store/d718ef...-foo` or any of its dependencies. -Subdirectories of `prefix/nix/var/nix/gcroots` are also searched for -symlinks. Symlinks to non-store paths are followed and searched for -roots, but symlinks to non-store paths *inside* the paths reached in -that way are not followed to prevent infinite recursion. +Subdirectories of `prefix/nix/var/nix/gcroots` are searched +recursively. Symlinks to store paths count as roots. Symlinks to +non-store paths are ignored, unless the non-store path is itself a +symlink to a store path. \ No newline at end of file