summaryrefslogtreecommitdiff
path: root/gnu/services.scm
diff options
context:
space:
mode:
authorBrice Waegeneire <brice@waegenei.re>2021-01-30 21:08:08 +0100
committerBrice Waegeneire <brice@waegenei.re>2021-03-09 06:56:12 +0100
commitdf138dc20858725b90ed77be85f3318cbe1be73a (patch)
treeeced31c9383c24d86792c6ef9a4db0f3f12b267d /gnu/services.scm
parentf5c6e6966c020722700ef0343ab0a6030e2d61b5 (diff)
gnu: services: Add activate script to the profile system directory.
* gnu/services.scm (activation-profile-entry): New procedure... (activation-service-type): ... use it.
Diffstat (limited to 'gnu/services.scm')
-rw-r--r--gnu/services.scm10
1 files changed, 9 insertions, 1 deletions
diff --git a/gnu/services.scm b/gnu/services.scm
index 13259dfaeee..ddd1bac30c0 100644
--- a/gnu/services.scm
+++ b/gnu/services.scm
@@ -617,13 +617,21 @@ ACTIVATION-SCRIPT-TYPE."
617 "Return a gexp that runs the activation script containing GEXPS." 617 "Return a gexp that runs the activation script containing GEXPS."
618 #~(primitive-load #$(activation-script gexps))) 618 #~(primitive-load #$(activation-script gexps)))
619 619
620(define (activation-profile-entry gexps)
621 "Return, as a monadic value, an entry for the activation script in the
622system directory."
623 (mlet %store-monad ((activate (lower-object (activation-script gexps))))
624 (return `(("activate" ,activate)))))
625
620(define (second-argument a b) b) 626(define (second-argument a b) b)
621 627
622(define activation-service-type 628(define activation-service-type
623 (service-type (name 'activate) 629 (service-type (name 'activate)
624 (extensions 630 (extensions
625 (list (service-extension boot-service-type 631 (list (service-extension boot-service-type
626 gexps->activation-gexp))) 632 gexps->activation-gexp)
633 (service-extension system-service-type
634 activation-profile-entry)))
627 (compose identity) 635 (compose identity)
628 (extend second-argument) 636 (extend second-argument)
629 (description 637 (description