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>
This commit is contained in:
Andrew Tropin 2022-08-02 08:00:21 +03:00 committed by Ludovic Courtès
parent a80edc0d82
commit b57c656f72
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -110,12 +110,18 @@ (define (ensure-xdg-base-dirs-on-activation config)
((@ (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