summary refs log tree commit diff
path: root/gnu/home-services.scm
diff options
context:
space:
mode:
authorAndrew Tropin <andrew@trop.in>2021-08-05 08:46:58 +0300
committerOleg Pykhalov <go.wigust@gmail.com>2021-09-09 19:54:54 +0300
commit305edf9c3a2dcaabc5a5216fc401c676222a463a (patch)
tree51e65652eb4982a739828445926dc5cc7e3f427e /gnu/home-services.scm
parente65848d153547185779f40f5077e200f4b1966de (diff)
downloadguix-305edf9c3a2dcaabc5a5216fc401c676222a463a.tar.gz
home-services: Add home-provenance-service-type.
* gnu/home-services.scm (home-provenance-service-type, sexp->home-provenance,
home-provenance): New variables.

Signed-off-by: Oleg Pykhalov <go.wigust@gmail.com>
Diffstat (limited to 'gnu/home-services.scm')
-rw-r--r--gnu/home-services.scm27
1 files changed, 26 insertions, 1 deletions
diff --git a/gnu/home-services.scm b/gnu/home-services.scm
index 32b59f55df..d320d3a44d 100644
--- a/gnu/home-services.scm
+++ b/gnu/home-services.scm
@@ -38,7 +38,10 @@
             home-files-service-type
             home-run-on-first-login-service-type
             home-activation-service-type
-            home-run-on-change-service-type)
+            home-run-on-change-service-type
+            home-provenance-service-type
+
+            fold-home-service-types)
 
   #:re-export (service
                service-type
@@ -467,3 +470,25 @@ G-expressions to run if the specified files have changed since the
 last generation.  The extension should be a list of lists where the
 first element is the pattern for file or directory that expected to be
 changed, and the second element is the G-expression to be evaluated.")))
+
+
+;;;
+;;; Provenance tracking.
+;;;
+
+(define home-provenance-service-type
+  (service-type
+   (name 'home-provenance)
+   (extensions
+    (list (service-extension
+           home-service-type
+           (service-extension-compute
+            (first (service-type-extensions provenance-service-type))))))
+   (default-value #f)                ;the HE config file
+   (description "\
+Store provenance information about the home environment in the home
+environment itself: the channels used when building the home
+environment, and its configuration file, when available.")))
+
+(define sexp->home-provenance sexp->system-provenance)
+(define home-provenance system-provenance)