From dd4eee55819a4c4eb68a8e0db0bf6cecfeac3136 Mon Sep 17 00:00:00 2001 From: Andrew Tropin Date: Thu, 22 Dec 2022 10:22:00 +0400 Subject: 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. --- gnu/home/services/xdg.scm | 35 +++++++++++++++++++---------------- 1 file 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 -- cgit 1.4.1