From 33b7cb7a595aa33051648039d417338110e5a45e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Sat, 30 Nov 2019 18:05:07 +0100 Subject: services: Add 'provenance-service-type'. * gnu/services.scm (object->pretty-string) (channel->code, channel->sexp, provenance-file) (provenance-entry): New procedures. (provenance-service-type): New variable. * gnu/system.scm (operating-system-with-provenance): New procedure. * doc/guix.texi (Service Reference): Document 'provenance-service-type'. --- gnu/system.scm | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'gnu/system.scm') diff --git a/gnu/system.scm b/gnu/system.scm index 96c2b5aad3..abdbb081e6 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -110,6 +110,7 @@ system-linux-image-file-name operating-system-with-gc-roots + operating-system-with-provenance boot-parameters boot-parameters? @@ -540,6 +541,15 @@ bookkeeping." gc-root-service-type roots) (operating-system-user-services os))))) +(define* (operating-system-with-provenance os #:optional config-file) + "Return a variant of OS that stores its own provenance information, +including CONFIG-FILE, if available. This is achieved by adding an instance +of PROVENANCE-SERVICE-TYPE to its services." + (operating-system + (inherit os) + (services (cons (service provenance-service-type config-file) + (operating-system-user-services os))))) + ;;; ;;; /etc. -- cgit v1.2.3