summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorVivien Kraus <vivien@planete-kraus.eu>2021-07-02 15:03:57 +0200
committerVivien Kraus <vivien@planete-kraus.eu>2021-07-02 15:05:07 +0200
commitf139de0aad495eb8b5e91b941fee3d749d9b6b6c (patch)
tree6668c02ce09de84e59a05a47afdedefa2e035ee1 /guix
parent146ed05a7af38e583c993ecd2383e6e9f30428f3 (diff)
Have rottlog rotate the service logs with guix
Diffstat (limited to 'guix')
-rw-r--r--guix/vkraus/services/webid-oidc.scm17
1 files changed, 17 insertions, 0 deletions
diff --git a/guix/vkraus/services/webid-oidc.scm b/guix/vkraus/services/webid-oidc.scm
index d985116..23f0da3 100644
--- a/guix/vkraus/services/webid-oidc.scm
+++ b/guix/vkraus/services/webid-oidc.scm
@@ -17,6 +17,7 @@
(define-module (vkraus services webid-oidc)
#:use-module (gnu services)
#:use-module (gnu services shepherd)
+ #:use-module (gnu services admin)
#:use-module (gnu system shadow)
#:use-module (gnu packages admin)
#:use-module (vkraus packages webid-oidc)
@@ -429,6 +430,12 @@
(home-directory "/var/empty")
(shell (file-append shadow "/sbin/nologin")))))
+(define (%webid-oidc-log-rotation file)
+ (list (log-rotation
+ (files
+ (map (lambda (ext) (string-append "/var/log/" file "." ext))
+ '("log" "ext"))))))
+
(define-public webid-oidc-issuer-service-type
(service-type
(name 'webid-oidc-issuer)
@@ -436,6 +443,8 @@
(list
(service-extension account-service-type
(const %webid-oidc-accounts))
+ (service-extension rottlog-service-type
+ (const (%webid-oidc-log-rotation "issuer")))
(service-extension
shepherd-root-service-type
webid-oidc-issuer-shepherd-service)))))
@@ -447,6 +456,8 @@
(list
(service-extension account-service-type
(const %webid-oidc-accounts))
+ (service-extension rottlog-service-type
+ (const (%webid-oidc-log-rotation "reverse-proxy")))
(service-extension
shepherd-root-service-type
webid-oidc-reverse-proxy-shepherd-service)))))
@@ -458,6 +469,8 @@
(list
(service-extension account-service-type
(const %webid-oidc-accounts))
+ (service-extension rottlog-service-type
+ (const (%webid-oidc-log-rotation "hello")))
(service-extension
shepherd-root-service-type
webid-oidc-hello-shepherd-service)))))
@@ -469,6 +482,8 @@
(list
(service-extension account-service-type
(const %webid-oidc-accounts))
+ (service-extension rottlog-service-type
+ (const (%webid-oidc-log-rotation "client-service")))
(service-extension
shepherd-root-service-type
webid-oidc-client-service-shepherd-service)))))
@@ -480,6 +495,8 @@
(list
(service-extension account-service-type
(const %webid-oidc-accounts))
+ (service-extension rottlog-service-type
+ (const (%webid-oidc-log-rotation "server")))
(service-extension
shepherd-root-service-type
webid-oidc-server-shepherd-service)))))