summaryrefslogtreecommitdiff
path: root/gnu/services/base.scm
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2019-05-31 18:25:48 +0100
committerChristopher Baines <mail@cbaines.net>2019-06-10 07:58:09 +0100
commit4252dace19945f56192477e8cb07973c20a526ba (patch)
tree7223cf2a9cf2cfd5f5fd30c54390e90caa5439a8 /gnu/services/base.scm
parentb09793172f59403779b01796be16b385b19b3345 (diff)
downloadpatches-4252dace19945f56192477e8cb07973c20a526ba.tar
patches-4252dace19945f56192477e8cb07973c20a526ba.tar.gz
services: guix-publish: Configure log rotation.
* gnu/services/base.scm (%guix-publish-log-rotations): New variable. (guix-publish-service-type): Extend the rottlog-service-type.
Diffstat (limited to 'gnu/services/base.scm')
-rw-r--r--gnu/services/base.scm7
1 files changed, 7 insertions, 0 deletions
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 5e46795a5a..3c1827fb70 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -28,6 +28,7 @@
#:use-module (guix store)
#:use-module (guix deprecation)
#:use-module (gnu services)
+ #:use-module (gnu services admin)
#:use-module (gnu services shepherd)
#:use-module (gnu system pam)
#:use-module (gnu system shadow) ; 'user-account', etc.
@@ -1838,6 +1839,10 @@ raise a deprecation warning if the 'compression-level' field was used."
(home-directory "/var/empty")
(shell (file-append shadow "/sbin/nologin")))))
+(define %guix-publish-log-rotations
+ (list (log-rotation
+ (files (list "/var/log/guix-publish.log")))))
+
(define (guix-publish-activation config)
(let ((cache (guix-publish-configuration-cache config)))
(if cache
@@ -1859,6 +1864,8 @@ raise a deprecation warning if the 'compression-level' field was used."
guix-publish-shepherd-service)
(service-extension account-service-type
(const %guix-publish-accounts))
+ (service-extension rottlog-service-type
+ (const %guix-publish-log-rotations))
(service-extension activation-service-type
guix-publish-activation)))
(default-value (guix-publish-configuration))