aboutsummaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
Diffstat (limited to 'guix')
-rw-r--r--guix/utils.scm3
1 files changed, 2 insertions, 1 deletions
diff --git a/guix/utils.scm b/guix/utils.scm
index a0e9439dd3..6c01edde21 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -808,7 +808,8 @@ elements after E."
(define (cache-directory)
"Return the cache directory for Guix, by default ~/.cache/guix."
(or (getenv "XDG_CONFIG_HOME")
- (and=> (getenv "HOME")
+ (and=> (or (getenv "HOME")
+ (passwd:dir (getpwuid (getuid))))
(cut string-append <> "/.cache/guix"))))
(define (readlink* file)