aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tropin <andrew@trop.in>2022-02-11 11:03:02 +0300
committerLudovic Courtès <ludo@gnu.org>2022-03-20 19:02:41 +0100
commite0089dc0e959b768184c5617bf6953ad5cd39f9e (patch)
treee5056532254a6d6f3cb694b51326aae02e508e5c
parentd3ef61ab175ddcb1e1df792aa613beb4519a479a (diff)
downloadguix-e0089dc0e959b768184c5617bf6953ad5cd39f9e.tar
guix-e0089dc0e959b768184c5617bf6953ad5cd39f9e.tar.gz
home: Add home-xdg-configuration-files service.
* gnu/home/services.scm (home-xdg-configuration-files): New variable. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
-rw-r--r--gnu/home/services.scm23
1 files changed, 23 insertions, 0 deletions
diff --git a/gnu/home/services.scm b/gnu/home/services.scm
index e69aa1cb0f..254663c6bb 100644
--- a/gnu/home/services.scm
+++ b/gnu/home/services.scm
@@ -38,12 +38,14 @@
home-profile-service-type
home-environment-variables-service-type
home-files-service-type
+ home-xdg-configuration-files-service-type
home-run-on-first-login-service-type
home-activation-service-type
home-run-on-change-service-type
home-provenance-service-type
home-files-directory
+ xdg-configuration-files-directory
fold-home-service-types
home-provenance
@@ -283,6 +285,27 @@ directory containing FILES."
(description "Files that will be put in
@file{~~/.guix-home/files}, and further processed during activation.")))
+(define xdg-configuration-files-directory "config")
+
+(define (xdg-configuration-files files)
+ "Add config/ prefix to each file-path in FILES."
+ (map (match-lambda
+ ((file-path . rest)
+ (cons (string-append xdg-configuration-files-directory "/" file-path)
+ rest)))
+ files))
+
+(define home-xdg-configuration-files-service-type
+ (service-type (name 'home-files)
+ (extensions
+ (list (service-extension home-files-service-type
+ xdg-configuration-files)))
+ (compose concatenate)
+ (extend append)
+ (default-value '())
+ (description "Files that will be put in
+@file{~~/.guix-home/files/config}, and further processed during activation.")))
+
(define %initialize-gettext
#~(begin
(bindtextdomain %gettext-domain