mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
gnu: services: Add activate script to the profile system directory.
* gnu/services.scm (activation-profile-entry): New procedure... (activation-service-type): ... use it.
This commit is contained in:
parent
f5c6e6966c
commit
df138dc208
1 changed files with 9 additions and 1 deletions
|
@ -617,13 +617,21 @@ (define (gexps->activation-gexp gexps)
|
|||
"Return a gexp that runs the activation script containing GEXPS."
|
||||
#~(primitive-load #$(activation-script gexps)))
|
||||
|
||||
(define (activation-profile-entry gexps)
|
||||
"Return, as a monadic value, an entry for the activation script in the
|
||||
system directory."
|
||||
(mlet %store-monad ((activate (lower-object (activation-script gexps))))
|
||||
(return `(("activate" ,activate)))))
|
||||
|
||||
(define (second-argument a b) b)
|
||||
|
||||
(define activation-service-type
|
||||
(service-type (name 'activate)
|
||||
(extensions
|
||||
(list (service-extension boot-service-type
|
||||
gexps->activation-gexp)))
|
||||
gexps->activation-gexp)
|
||||
(service-extension system-service-type
|
||||
activation-profile-entry)))
|
||||
(compose identity)
|
||||
(extend second-argument)
|
||||
(description
|
||||
|
|
Loading…
Reference in a new issue