mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
services: Add the Shepherd’s ‘transient’ and ‘timer’ to ‘%base-services’.
* gnu/services/base.scm (%base-services): Add instances of ‘shepherd-timer-service-type’ and ‘shepherd-transient-service-type’. Change-Id: I28a35d0dce40b142ee71b330b1cf7a3d222ef6bd
This commit is contained in:
parent
e73cf57a20
commit
dc0df5eb47
2 changed files with 22 additions and 16 deletions
|
@ -3750,6 +3750,10 @@ login manager daemon.")
|
||||||
|
|
||||||
(service log-rotation-service-type)
|
(service log-rotation-service-type)
|
||||||
|
|
||||||
|
;; Convenient services brought by the Shepherd.
|
||||||
|
(service shepherd-timer-service-type)
|
||||||
|
(service shepherd-transient-service-type)
|
||||||
|
|
||||||
;; Periodically delete old build logs.
|
;; Periodically delete old build logs.
|
||||||
(service log-cleanup-service-type
|
(service log-cleanup-service-type
|
||||||
(log-cleanup-configuration
|
(log-cleanup-configuration
|
||||||
|
|
|
@ -678,14 +678,15 @@ seconds after @code{SIGTERM} has been sent are terminated with
|
||||||
(define shepherd-timer-service-type
|
(define shepherd-timer-service-type
|
||||||
(shepherd-service-type
|
(shepherd-service-type
|
||||||
'shepherd-timer
|
'shepherd-timer
|
||||||
(const (shepherd-service
|
(lambda (requirement)
|
||||||
(provision '(timer))
|
(shepherd-service
|
||||||
(requirement '(user-processes))
|
(provision '(timer))
|
||||||
(modules '((shepherd service timer)))
|
(requirement requirement)
|
||||||
(free-form #~(timer-service
|
(modules '((shepherd service timer)))
|
||||||
'#$provision
|
(free-form #~(timer-service
|
||||||
#:requirement '#$requirement))))
|
'#$provision
|
||||||
#t ;ignored
|
#:requirement '#$requirement))))
|
||||||
|
'(user-processes)
|
||||||
(description "The Shepherd @code{timer} service lets you schedule commands
|
(description "The Shepherd @code{timer} service lets you schedule commands
|
||||||
dynamically, similar to the @code{at} command that your grandparents would use
|
dynamically, similar to the @code{at} command that your grandparents would use
|
||||||
on that Slackware they got on a floppy disk. For example, consider this
|
on that Slackware they got on a floppy disk. For example, consider this
|
||||||
|
@ -700,14 +701,15 @@ It does exactly what you would expect.")))
|
||||||
(define shepherd-transient-service-type
|
(define shepherd-transient-service-type
|
||||||
(shepherd-service-type
|
(shepherd-service-type
|
||||||
'shepherd-transient
|
'shepherd-transient
|
||||||
(const (shepherd-service
|
(lambda (requirement)
|
||||||
(provision '(transient))
|
(shepherd-service
|
||||||
(requirement '(user-processes))
|
(provision '(transient))
|
||||||
(modules '((shepherd service transient)))
|
(requirement requirement)
|
||||||
(free-form #~(transient-service
|
(modules '((shepherd service transient)))
|
||||||
'#$provision
|
(free-form #~(transient-service
|
||||||
#:requirement '#$requirement))))
|
'#$provision
|
||||||
#t ;ignored
|
#:requirement '#$requirement))))
|
||||||
|
'(user-processes)
|
||||||
(description "The Shepherd @code{transient} service lets you run commands
|
(description "The Shepherd @code{transient} service lets you run commands
|
||||||
asynchronously, in the background, similar to @command{systemd-run}, as in
|
asynchronously, in the background, similar to @command{systemd-run}, as in
|
||||||
this example:
|
this example:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue