diff options
author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2023-03-23 21:45:21 -0400 |
---|---|---|
committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2023-03-23 21:45:21 -0400 |
commit | 839bb4616f13171a23ad7937bf57d0a01d61d42a (patch) | |
tree | 01de78a5ce973b9fb7ac0f9216d64f736f8e163d /gnu/home.scm | |
parent | 0357bbbcd850f9220078a62da3c30358b8983765 (diff) | |
parent | ef71e3290916583973724316e815cee840c1b6d8 (diff) |
Merge remote-tracking branch 'origin/master' into staging.
With resolved conflicts in:
gnu/packages/ibus.scm
gnu/packages/image.scm
gnu/packages/lisp.scm
gnu/packages/virtualization.scm
Diffstat (limited to 'gnu/home.scm')
-rw-r--r-- | gnu/home.scm | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/gnu/home.scm b/gnu/home.scm index c95d1e0818..2fefe7ba53 100644 --- a/gnu/home.scm +++ b/gnu/home.scm @@ -35,6 +35,7 @@ this-home-environment home-environment-derivation + home-environment-packages home-environment-user-services home-environment-essential-services home-environment-services @@ -102,7 +103,21 @@ #:target-type home-service-type))) (service-value home))) -(define* (home-environment-with-provenance he config-file) + +(define (home-environment-configuration-file he) + "Return the configuration file of HE, based on its 'location' field, or #f +if it could not be determined." + (let ((file (and=> (home-environment-location he) + location-file))) + (and file + (or (and (string-prefix? "/" file) file) + (search-path %load-path file))))) + +(define* (home-environment-with-provenance he + #:optional + (config-file + (home-environment-configuration-file + he))) "Return a variant of HE that stores its own provenance information, including CONFIG-FILE, if available. This is achieved by adding an instance of HOME-PROVENANCE-SERVICE-TYPE to its services." |