Subject: [PATCH] services: guix-publish: Configure log rotation.

From: Christopher Baines <[email-masked]>
Date: Fri, 31 May 2019 18:28:11 +0100

* gnu/services/base.scm (%guix-publish-log-rotations): New variable.
(guix-publish-service-type): Extend the rottlog-service-type.
---
 gnu/services/base.scm | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 4593ac202f..1b3beb1c75 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -1807,6 +1807,10 @@ archive' public keys, with GUIX."
          (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
@@ -1828,6 +1832,8 @@ archive' public keys, with GUIX."
                                           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))
-- 
2.21.0