services: home-goimapnotify-service-type: Add wait option.

* modules/rosenthal/services/mail.scm (home-goimapnotify-configuration): Add
wait option.
(home-goimapnotify-shepherd): Use it.
This commit is contained in:
Hilton Chain 2025-10-20 00:49:05 +08:00
parent 677b4962a0
commit 9e2dc3254d
No known key found for this signature in database
GPG Key ID: ACC66D09CA528292

View File

@ -88,6 +88,9 @@
(config (config
yaml-config yaml-config
"") "")
(wait
(integer 1)
"")
(shepherd-provision (shepherd-provision
(list-of-symbols '(goimapnotify)) (list-of-symbols '(goimapnotify))
"") "")
@ -100,7 +103,7 @@
(define home-goimapnotify-shepherd (define home-goimapnotify-shepherd
(match-record-lambda <home-goimapnotify-configuration> (match-record-lambda <home-goimapnotify-configuration>
(goimapnotify config shepherd-provision shepherd-requirement auto-start?) (goimapnotify config wait shepherd-provision shepherd-requirement auto-start?)
(let ((config-file (let ((config-file
(mixed-text-file "goimapnotify.yaml" (yaml-serialize config)))) (mixed-text-file "goimapnotify.yaml" (yaml-serialize config))))
(list (shepherd-service (list (shepherd-service
@ -109,7 +112,8 @@
(start (start
#~(make-forkexec-constructor #~(make-forkexec-constructor
(list #$(file-append goimapnotify "/bin/goimapnotify") (list #$(file-append goimapnotify "/bin/goimapnotify")
"-conf" #$config-file))) "-conf" #$config-file
"-wait" (number->string #$wait))))
(stop #~(make-kill-destructor)) (stop #~(make-kill-destructor))
(auto-start? auto-start?)))))) (auto-start? auto-start?))))))