summary refs log tree commit diff
path: root/doc/guix.texi
diff options
context:
space:
mode:
authorThiago Jung Bauermann <bauermann@kolabnow.com>2021-09-15 20:36:38 -0300
committerMathieu Othacehe <othacehe@gnu.org>2021-09-20 14:18:21 +0000
commit5c4fd77097e2cecfd4780e099af7954f86779fe1 (patch)
treea04414dfc0a56a01daf096c10aa9c52489281d5e /doc/guix.texi
parentcbb76da1f6fd9a27bb1826274493cc6f33000f18 (diff)
downloadguix-5c4fd77097e2cecfd4780e099af7954f86779fe1.tar.gz
etc: Add systemd files for running ‘guix gc’ periodically
* etc/guix-gc.service.in: New file.
* etc/guix-gc.timer: Likewise.
* .gitignore: Ignore generated ‘guix-gc.service’.
* nix/local.mk (nodist_systemdservice_DATA): Add ‘guix-gc.service’ and
‘guix-gc.timer’.
(EXTRA_DIST): Add ‘guix-gc.service.in’ and ‘guix-gc.timer’.
* doc/guix.texi (Binary Installation): Mention the new systemd files.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
Diffstat (limited to 'doc/guix.texi')
-rw-r--r--doc/guix.texi12
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index 6436e83a7c..cd8e249ae8 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -743,6 +743,18 @@ with these commands:
 # systemctl enable --now gnu-store.mount guix-daemon
 @end example
 
+You may also want to arrange for @command{guix gc} to run periodically:
+
+@example
+# cp ~root/.config/guix/current/lib/systemd/system/guix-gc.service \
+     ~root/.config/guix/current/lib/systemd/system/guix-gc.timer \
+     /etc/systemd/system/
+# systemctl enable --now guix-gc.timer
+@end example
+
+You may want to edit @file{guix-gc.service} to adjust the command line
+options to fit your needs (@pxref{Invoking guix gc}).
+
 If your host distro uses the Upstart init system:
 
 @example