Hi all,
I recently moved some custom services [1] from mcron jobs to shepherd timers
and I wanted to add the timer-trigger-action to those services. I wanted
to know if anyone else has had success with this, because my naive
approach hasn't worked.
--8<---------------cut here---------------start------------->8---
(define* (make-shepherd-service-timer provision requirement body
#:key documentation
(modules '()))
(shepherd-service
(provision (list provision))
(requirement requirement)
(modules (cons '(shepherd service timer) modules))
(start #~(make-timer-constructor
#$@body))
(stop #~(make-timer-destructor))
(actions (list timer-trigger-action)) ; <-this thing
(documentation documentation)))
--8<---------------cut here---------------end--------------->8---
My understanding is that I'm operating on a <shepherd-service> record
defined in (gnu services shepherd):204, not the service procedure
defined in (shepherd service). This record expects a list of
<shepherd-action> records, which is not what timer-trigger-action is.
I don't see any method to "splice" in arbitrary actions as a sexp for
shepherd services, which as far as I can tell is the only solution.
timer-trigger-action can't even be resolved in guix system reconfigure,
even when using (shepherd service timer).
Has anyone had any luck adding the timer-trigger-action to Shepherd
services with timers in GNU Guix?
Thanks! :)
[1]:
https://git.sr.ht/~freakingpenguin/rsent/tree/master/item/rsent/services/btrfs.scm
--
Take it easy,
Richard Sent
Making my computer weirder one commit at a time.