summaryrefslogtreecommitdiff
path: root/doc/guix-cookbook.texi
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2026-01-24 23:42:29 +0100
committerLudovic Courtès <ludo@gnu.org>2026-01-26 10:18:39 +0100
commit085c6e65834c7d47c50e49e3f1c93e0422ca1d4f (patch)
tree4576406f0fd410c2a6ba7352e0d3699c06f5675e /doc/guix-cookbook.texi
parent28ce4eae6b22ce566b0d35f6d7f408599a79c505 (diff)
doc: cookbook: Recommend systemd timer for ‘guix gc’.
* doc/guix-cookbook.texi (Setting Up a Head Node): Give instructions for the systemd timer rather than ‘crontab’. Change-Id: I063ad0ea694500a67553d66d37ae354b9c078a65
Diffstat (limited to 'doc/guix-cookbook.texi')
-rw-r--r--doc/guix-cookbook.texi20
1 files changed, 13 insertions, 7 deletions
diff --git a/doc/guix-cookbook.texi b/doc/guix-cookbook.texi
index a08ad1d740f..0a63161e020 100644
--- a/doc/guix-cookbook.texi
+++ b/doc/guix-cookbook.texi
@@ -6035,19 +6035,25 @@ avoids collecting software they refer to.
6035It may be a good idea to periodically remove unused bits from 6035It may be a good idea to periodically remove unused bits from
6036@file{/gnu/store} by running @command{guix gc} (@pxref{Invoking guix 6036@file{/gnu/store} by running @command{guix gc} (@pxref{Invoking guix
6037gc,,, guix, GNU Guix Reference Manual}). This can be done by adding a 6037gc,,, guix, GNU Guix Reference Manual}). This can be done by adding a
6038systemd timer or a crontab entry on the head node: 6038systemd timer based on the one shipped with Guix:
6039 6039
6040@example 6040@example
6041root@@master# crontab -e 6041cp \
6042 /var/guix/profiles/per-user/root/current-guix/lib/systemd/system/guix-gc.* \
6043 /etc/systemd/system
6042@end example 6044@end example
6043 6045
6044@noindent 6046Make sure to edit @file{guix-gc.service} and @file{guix-gc.timer} under
6045... with something like this: 6047@file{/etc/systemd/system} to adjust the parameters to your need: timer
6048frequency, amount of free space, and whether to delete user's old
6049generations. We recommend executing @command{guix gc -F50G} every
6050night, which will ensure that at least 50@tie{}GiB are available,
6051without deleting user generations. Once you're satisfied, you can start
6052the timer:
6046 6053
6047@example 6054@example
6048# Every day at 5AM, run the garbage collector to make sure 6055systemctl daemon-reload
6049# at least 10 GB are free on /gnu/store. 6056systemctl start guix-gc.timer
60500 5 * * 1 /usr/local/bin/guix gc -F10G
6051@end example 6057@end example
6052 6058
6053We're done with the head node! Let's look at compute nodes now. 6059We're done with the head node! Let's look at compute nodes now.