diff options
author | Andrew Tropin <andrew@trop.in> | 2022-03-29 12:47:39 +0300 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2022-04-08 20:13:48 +0200 |
commit | 20645d8467852990413c1ea9cf81cec82d23defd (patch) | |
tree | b09c8315c7f3709d01559f05bfc5a94fd40a51a3 /gnu/home/services.scm | |
parent | 5832d9fb601c7d4ec5380654db2b62b906bc658f (diff) | |
download | guix-20645d8467852990413c1ea9cf81cec82d23defd.tar.gz |
home: Add home-xdg-data-files-service-type.
* gnu/home/services.scm (home-xdg-data-files-service-type): New variable. * gnu/home/services/symlink-manager.scm (update-symlinks-script): Add a proper handling for XDG_DATA_HOME value. * gnu/home/services/xdg.scm (home-xdg-mime-applications-service-type): Use home-xdg-data-files service. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/home/services.scm')
-rw-r--r-- | gnu/home/services.scm | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/gnu/home/services.scm b/gnu/home/services.scm index 41e60886d0..8284a4f3fc 100644 --- a/gnu/home/services.scm +++ b/gnu/home/services.scm @@ -39,6 +39,7 @@ home-environment-variables-service-type home-files-service-type home-xdg-configuration-files-service-type + home-xdg-data-files-service-type home-run-on-first-login-service-type home-activation-service-type home-run-on-change-service-type @@ -46,6 +47,7 @@ home-files-directory xdg-configuration-files-directory + xdg-data-files-directory fold-home-service-types home-provenance @@ -306,6 +308,29 @@ directory containing FILES." (description "Files that will be put in @file{~~/.guix-home/files/.config}, and further processed during activation."))) +(define xdg-data-files-directory ".local/share") + +(define (xdg-data-files files) + "Add .local/share prefix to each file-path in FILES." + (map (match-lambda + ((file-path . rest) + (cons (string-append xdg-data-files-directory "/" file-path) + rest))) + files)) + +(define home-xdg-data-files-service-type + (service-type (name 'home-xdg-data) + (extensions + (list (service-extension home-files-service-type + xdg-data-files))) + (compose concatenate) + (extend append) + (default-value '()) + (description "Files that will be put in +@file{~~/.guix-home/files/.local/share}, and further processed during +activation."))) + + (define %initialize-gettext #~(begin (bindtextdomain %gettext-domain |