guix-mirrors/guix/scripts
Ludovic Courtès d12c4452a4
shell, inferior: Store GC roots under /var/guix/profiles.
Fixes guix/guix#2410.

Until now, ‘guix shell’ and ‘guix time-machine’ would store GC roots under
~/.cache/guix.  However, this directory is unreadable to guix-daemon when it’s
running without root privileges.  This commit changes ‘guix shell’ and ‘guix
time-machine’ so they store GC roots under /var/guix/profiles/per-user/$USER,
in a world-readable directory.

An added benefit is that, in cluster setups, user homes no longer need to be
mounted on the head node for GC to work (assuming ‘guix build -r’ and similar
are not used).

* guix/inferior.scm (%inferior-cache-directory): Change default value to be
under ‘%profile-directory’.
(%legacy-inferior-cache-directory): New variable.
(cached-channel-instance): Add ‘maybe-remove-expired-cache-entries’ call.
* guix/scripts/environment.scm (launch-environment/container)[nesting-mappings]:
Add /inferiors and /profiles sub-directories of ‘%profile-directory’.  Call
‘mkdir-p’ for these two directories.
* guix/scripts/shell.scm (%profile-cache-directory): Change default value to
be under ‘%profile-directory’.
(%legacy-cache-directory): New variable.
(guix-shell): Add call to ‘maybe-remove-expired-cache-entries’.

Change-Id: Ie7d6c16a55b35c7beb18078c967d6fc902bf68d0
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-09-23 11:13:22 +02:00
..
container
git git authenticate: Create Git hooks directory. 2025-06-30 14:30:40 +02:00
home home: Define ‘%base-home-services’. 2025-01-16 22:32:11 +01:00
import Reapply "Update Maxim's email address." 2025-09-18 13:44:12 +09:00
system guix: scripts: reconfigure: Export running-services variable. 2025-04-01 14:49:34 +02:00
archive.scm pki: Always make /etc/guix/acl world-readable. 2025-07-16 23:50:38 +02:00
authenticate.scm
build.scm guix build: Honor '--system' with '--manifest'. 2025-03-02 16:46:59 +02:00
challenge.scm challenge: Use the same substitute URLs as guix-daemon. 2023-12-11 23:18:57 +01:00
container.scm
copy.scm
deploy.scm deploy: Add --roll-back option. 2025-03-01 00:18:38 +00:00
describe.scm describe: Recognize git.guix.gnu.org for commit hyperlinks. 2025-05-23 11:17:59 +02:00
discover.scm guix: Avoid ‘fdatasync’ call for caches and regular files. 2025-04-14 17:31:50 +02:00
download.scm guix download: Honor ‘--no-check-certificate’ for ‘--git’. 2024-12-25 23:51:10 +01:00
edit.scm
environment.scm shell, inferior: Store GC roots under /var/guix/profiles. 2025-09-23 11:13:22 +02:00
gc.scm gc: Open a connection to the daemon only when strictly necessary. 2025-09-18 12:14:34 +02:00
git.scm
graph.scm packages: Factorize ‘all-packages’. 2024-12-01 20:14:15 +01:00
hash.scm scripts: hash: Handle repository with different VCS folders. 2024-07-23 16:27:27 +02:00
home.scm home: Adjust file system mount options. 2025-09-17 11:55:14 +02:00
import.scm scripts: import: Skip existing definition for ‘--insert’ option. 2025-08-21 19:08:19 +08:00
install.scm
lint.scm
locate.scm locate: Request writable db for --clear. 2025-04-16 18:20:44 +02:00
offload.scm Reapply "Update Maxim's email address." 2025-09-18 13:44:12 +09:00
pack.scm Reapply "Update Maxim's email address." 2025-09-18 13:44:12 +09:00
package.scm
perform-download.scm perform-download: Use (ice-9 sandbox) for mirrors. 2025-09-01 16:13:29 +02:00
processes.scm
publish.scm Revert "publish: Prevent publication of non-substitutable derivation outputs." 2025-09-21 18:47:23 +02:00
pull.scm pull: Add ‘--no-check-certificate’. 2024-12-25 23:51:10 +01:00
refresh.scm Reapply "Update Maxim's email address." 2025-09-18 13:44:12 +09:00
remove.scm
repl.scm
search.scm
shell.scm shell, inferior: Store GC roots under /var/guix/profiles. 2025-09-23 11:13:22 +02:00
show.scm
size.scm size: Improve error message. 2025-09-04 12:19:53 +02:00
style.scm guix: Avoid ‘fdatasync’ call for caches and regular files. 2025-04-14 17:31:50 +02:00
substitute.scm scripts/substitute: Refine 'updating substitutes' message. 2024-12-18 16:27:09 +09:00
system.scm mapped-devices: Add ‘arguments’ field. 2025-07-18 00:57:25 +02:00
time-machine.scm Reapply "Update Maxim's email address." 2025-09-18 13:44:12 +09:00
upgrade.scm
weather.scm weather: Reword the help message for the expression flag. 2024-12-23 20:45:32 +01:00