summaryrefslogtreecommitdiff
path: root/gnu/home
diff options
context:
space:
mode:
authorAndrew Tropin <andrew@trop.in>2022-08-02 08:00:21 +0300
committerLudovic Courtès <ludo@gnu.org>2022-08-05 15:28:02 +0200
commitb57c656f72cee42ebbd78fe2267689aecfbd970e (patch)
tree46f6e8368b5fb4ef4dadf8b4f0aaa509876a944f /gnu/home
parenta80edc0d82c104d22607da5c44225d9105c3e1cf (diff)
home: xdg: Skip mkdir XDG_RUNTIME_DIR in activation script.
* gnu/home/services/xdg.scm (ensure-xdg-base-dirs-on-activation): Skip mkdir XDG_RUNTIME_DIR in activation script. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/home')
-rw-r--r--gnu/home/services/xdg.scm18
1 files changed, 12 insertions, 6 deletions
diff --git a/gnu/home/services/xdg.scm b/gnu/home/services/xdg.scm
index 04cf9d0aed..63c6041cd4 100644
--- a/gnu/home/services/xdg.scm
+++ b/gnu/home/services/xdg.scm
@@ -110,12 +110,18 @@ services more consistent."))
((@ (guix build utils) mkdir-p)
(getenv
xdg-base-dir-variable)))
- '#$(map (lambda (field)
- (format
- #f "XDG_~a"
- (object->snake-case-string
- (configuration-field-name field) 'upper)))
- home-xdg-base-directories-configuration-fields)))
+ '#$(filter-map
+ (lambda (field)
+ (let ((variable
+ (string-append
+ "XDG_"
+ (object->snake-case-string
+ (configuration-field-name field) 'upper))))
+ ;; XDG_RUNTIME_DIR shouldn't be created during activation
+ ;; and will be provided by elogind or other service.
+ (and (not (string=? "XDG_RUNTIME_DIR" variable))
+ variable)))
+ home-xdg-base-directories-configuration-fields)))
(define (last-extension-or-cfg config extensions)
"Picks configuration value from last provided extension. If there