nix: Install guix-gc systemd timer.

* nix/local.mk (nodist_systemdservice_DATA): Add etc/guix-gc.timer.
(etc/guix-gc.timer): Add rule to generate file.
(EXTRA_DIST): Add guix-gc.timer.in, remove guix-gc.timer.
* gitignore: Add etc/guix-gc.timer.

Change-Id: I361aef660fe7d9803f58f4e31e16d8db595d1853
This commit is contained in:
Efraim Flashner 2025-03-02 14:21:59 +02:00
parent 7b091cefa4
commit 61ca5bdbce
No known key found for this signature in database
GPG key ID: 41AAE7DCCA3D8351
3 changed files with 10 additions and 3 deletions

15
etc/guix-gc.timer.in Normal file
View file

@ -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