From 997dd3aa510c1d56487e5fdf8b4a3c7ccb45b074 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Sat, 24 Jan 2026 23:49:41 +0100 Subject: [PATCH] =?UTF-8?q?doc:=20cookbook:=20Don=E2=80=99t=20insist=20on?= =?UTF-8?q?=20mounting=20home=20directories=20on=20the=20head=20node.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * doc/guix-cookbook.texi (Setting Up a Head Node): State that mounting home directories on the head node is “optional”. Change-Id: Id60b54d463f5422f71a71607cd71ed347a98865e Merges: #5890 --- doc/guix-cookbook.texi | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/doc/guix-cookbook.texi b/doc/guix-cookbook.texi index 0a63161e02..b04ca538ab 100644 --- a/doc/guix-cookbook.texi +++ b/doc/guix-cookbook.texi @@ -6022,16 +6022,29 @@ The @file{/gnu/store} directory can be exported read-only since only package}; thus, to allow users to install packages with @code{guix package}, this must be read-write. -Users can create as many profiles as they like in addition to the -default profile, @file{~/.guix-profile}. For instance, @code{guix -package -p ~/dev/python-dev -i python} installs Python in a profile -reachable from the @code{~/dev/python-dev} symlink. To make sure that +@quotation Note +Although it is rarely used, Guix allows for the creation of profiles in +non-default locations. For instance, @code{guix package -p +~/dev/python-dev -i python} installs Python in a profile reachable from +the @code{~/dev/python-dev} symlink instead of the default +@file{~/.guix-profile}. + +To make sure that this profile is protected from garbage collection---i.e., that Python will not be removed from @file{/gnu/store} while this profile exists---, @emph{home directories should be mounted on the head node} as well so that @code{guix-daemon} knows about these non-standard profiles and avoids collecting software they refer to. +@c The following paragraph refers to Guix commit +@c d12c4452a49b355369636de1dfc766b5bad6437b, which changed +@c 'time-machine' and 'shell' to store GC roots under /var/guix. +Doing so is optional though: profiles created by default by +@command{guix package}, @command{guix pull}, and @command{guix shell} +are all stored under @file{/var/guix} and thus protected from garbage +collection. +@end quotation + It may be a good idea to periodically remove unused bits from @file{/gnu/store} by running @command{guix gc} (@pxref{Invoking guix gc,,, guix, GNU Guix Reference Manual}). This can be done by adding a