From e98e5ee520fada9c6d100f40fcafa6358b626365 Mon Sep 17 00:00:00 2001 From: Andrew Tropin Date: Fri, 11 Feb 2022 11:03:02 +0300 Subject: [PATCH v2 2/5] home: Add home-xdg-configuration-files service. * gnu/home/services.scm (home-xdg-configuration-files): New variable. --- gnu/home/services.scm | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/gnu/home/services.scm b/gnu/home/services.scm index 32b10e99aa..2f441eb968 100644 --- a/gnu/home/services.scm +++ b/gnu/home/services.scm @@ -38,12 +38,14 @@ (define-module (gnu home services) 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 @@ (define home-files-service-type (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 -- 2.34.0