Add mcron service that runs inkplate-display at midnight

This commit is contained in:
Tom Willemse 2024-01-16 01:08:03 -08:00
parent 7d38c4d12a
commit 265c55bcda

View file

@ -6,6 +6,9 @@
#:select (service-type #:select (service-type
service-extension service-extension
home-profile-service-type)) home-profile-service-type))
#:use-module ((gnu home services mcron)
#:select (home-mcron-service-type
home-mcron-configuration))
#:use-module ((gnu home services shepherd) #:use-module ((gnu home services shepherd)
#:select (home-shepherd-service-type #:select (home-shepherd-service-type
shepherd-service)) shepherd-service))
@ -45,6 +48,13 @@
#~(make-forkexec-constructor #~(make-forkexec-constructor
'(#$(file-append inkplate-display "/bin/inkplate-display"))))))) '(#$(file-append inkplate-display "/bin/inkplate-display")))))))
(define (home-inkplate-display-mcron-service config)
(list #~(job '(next-day)
(lambda ()
(system* "herd" "start" "inkplate-display"))
;; "herd start inkplate-display"
"Get new email and process it via the Notmuch hook scripts.")))
(define home-inkplate-display-service-type (define home-inkplate-display-service-type
(service-type (service-type
(name 'home-inkplate-display) (name 'home-inkplate-display)
@ -54,7 +64,10 @@
add-inkplate-display-packages) add-inkplate-display-packages)
(service-extension (service-extension
home-shepherd-service-type home-shepherd-service-type
home-inkplate-display-shepherd-service))) home-inkplate-display-shepherd-service)
(service-extension
home-mcron-service-type
home-inkplate-display-mcron-service)))
(compose identity) (compose identity)
(default-value (home-inkplate-display-configuration)) (default-value (home-inkplate-display-configuration))
(description "Install and configure Inkplate display."))) (description "Install and configure Inkplate display.")))