From 95393955f1b88ae25004d88d2b1c07474b32add1 Mon Sep 17 00:00:00 2001 From: Hilton Chain Date: Thu, 7 Dec 2023 13:06:06 +0800 Subject: [PATCH] services: iwd: Rotate logs. * rosenthal/services/networking.scm (iwd-log-rotations): New procedure. (iwd-service-type): Extend rottlog-service-type with it. --- rosenthal/services/networking.scm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/rosenthal/services/networking.scm b/rosenthal/services/networking.scm index 6d81355..803c0a2 100644 --- a/rosenthal/services/networking.scm +++ b/rosenthal/services/networking.scm @@ -347,6 +347,10 @@ list, power save will be disabled.")) (define add-iwd-package (compose list iwd-configuration-iwd)) +(define (iwd-log-rotations config) + (list (log-rotation + (files (list (iwd-configuration-log-file config)))))) + (define (iwd-shepherd-service config) (match-record config (iwd resolvconf log-file @@ -382,7 +386,9 @@ list, power save will be disabled.")) (service-extension etc-service-type add-iwd-config-file) (service-extension profile-service-type - add-iwd-package))) + add-iwd-package) + (service-extension rottlog-service-type + iwd-log-rotations))) (default-value (iwd-configuration)) (description "Run iwd, the iNet wireless daemon.")))