summary refs log tree commit diff
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
parentf5c6e6966c020722700ef0343ab0a6030e2d61b5 (diff)
downloadguix-df138dc20858725b90ed77be85f3318cbe1be73a.tar.gz
gnu: services: Add activate script to the profile system directory.
* gnu/services.scm (activation-profile-entry): New procedure...
(activation-service-type): ... use it.
-rw-r--r--gnu/services.scm10
1 files changed, 9 insertions, 1 deletions
diff --git a/gnu/services.scm b/gnu/services.scm
index 13259dfaee..ddd1bac30c 100644
--- a/gnu/services.scm
+++ b/gnu/services.scm
@@ -617,13 +617,21 @@ ACTIVATION-SCRIPT-TYPE."
   "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