aboutsummaryrefslogtreecommitdiff
path: root/etc/guix-gc.timer
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 /etc/guix-gc.timer
parentcbb76da1f6fd9a27bb1826274493cc6f33000f18 (diff)
downloadguix-5c4fd77097e2cecfd4780e099af7954f86779fe1.tar
guix-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 'etc/guix-gc.timer')
-rw-r--r--etc/guix-gc.timer15
1 files changed, 15 insertions, 0 deletions
diff --git a/etc/guix-gc.timer b/etc/guix-gc.timer
new file mode 100644
index 0000000000..192132fbda
--- /dev/null
+++ b/etc/guix-gc.timer
@@ -0,0 +1,15 @@
+# This is a "timer unit file" for the systemd init system to trigger
+# 'guix-gc.service' periodically. Drop it in /etc/systemd/system or similar
+# together with 'guix-gc.service' to set it up.
+
+[Unit]
+Description=Discard unused Guix store items
+
+[Timer]
+OnCalendar=weekly
+AccuracySec=1h
+Persistent=true
+RandomizedDelaySec=6000
+
+[Install]
+WantedBy=timers.target