diff mbox series

[bug#35794] services: guix-publish: Configure log rotation.

Message ID 20190531172811.15086-1-mail@cbaines.net
State Accepted
Headers show
Series [bug#35794] services: guix-publish: Configure log rotation. | expand

Checks

Context Check Description
cbaines/applying patch fail Apply failed

Commit Message

Christopher Baines May 31, 2019, 5:28 p.m. UTC
* 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(+)

Comments

Ludovic Courtès June 7, 2019, 7:45 a.m. UTC | #1
Christopher Baines <mail@cbaines.net> skribis:

> * gnu/services/base.scm (%guix-publish-log-rotations): New variable.
> (guix-publish-service-type): Extend the rottlog-service-type.

LGTM!
Christopher Baines June 10, 2019, 7 a.m. UTC | #2
Ludovic Courtès <ludo@gnu.org> writes:

> Christopher Baines <mail@cbaines.net> skribis:
>
>> * gnu/services/base.scm (%guix-publish-log-rotations): New variable.
>> (guix-publish-service-type): Extend the rottlog-service-type.
>
> LGTM!

Great, I've pushed these patches now :)
diff mbox series

Patch

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