diff options
author | Andrew Tropin <andrew@trop.in> | 2022-12-22 10:22:00 +0400 |
---|---|---|
committer | Andrew Tropin <andrew@trop.in> | 2022-12-23 11:43:27 +0400 |
commit | dd4eee55819a4c4eb68a8e0db0bf6cecfeac3136 (patch) | |
tree | 68dd185429336ce7579bd17b45d6aa2d35d4af6b /gnu/home/services | |
parent | 1b29fccff2334fb5d6e979a290233a452969e39b (diff) | |
download | guix-dd4eee55819a4c4eb68a8e0db0bf6cecfeac3136.tar guix-dd4eee55819a4c4eb68a8e0db0bf6cecfeac3136.tar.gz |
home: xdg: Add with-imported-modules to xdg activation script.
Without it activation doesn't work when called in clean environment.
* gnu/home/services/xdg.scm (ensure-xdg-base-dirs-on-activation): Add
with-imported-modules to xdg activation script.
Diffstat (limited to 'gnu/home/services')
-rw-r--r-- | gnu/home/services/xdg.scm | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/gnu/home/services/xdg.scm b/gnu/home/services/xdg.scm index fb2dbb393e..3007493f85 100644 --- a/gnu/home/services/xdg.scm +++ b/gnu/home/services/xdg.scm @@ -120,22 +120,25 @@ services more consistent.")) home-xdg-base-directories-configuration-fields)) (define (ensure-xdg-base-dirs-on-activation config) - #~(map (lambda (xdg-base-dir-variable) - ((@ (guix build utils) mkdir-p) - (getenv - xdg-base-dir-variable))) - '#$(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))) + (with-imported-modules '((guix build utils)) + #~(begin + (use-modules (guix build utils)) + (map (lambda (xdg-base-dir-variable) + (mkdir-p + (getenv + xdg-base-dir-variable))) + '#$(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 |