summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--guix/scripts/environment.scm19
1 files changed, 11 insertions, 8 deletions
diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
index 44cfcb4f76..33a76abff3 100644
--- a/guix/scripts/environment.scm
+++ b/guix/scripts/environment.scm
@@ -767,14 +767,17 @@ WHILE-LIST."
(append
(override-user-mappings
user home
- (append user-mappings
- ;; Share current working directory, unless asked not to.
- (if map-cwd?
- (list (file-system-mapping
- (source cwd)
- (target cwd)
- (writable? #t)))
- '())))
+ (append
+ ;; Share current working directory, unless asked not to.
+ (if map-cwd?
+ (list (file-system-mapping
+ (source cwd)
+ (target cwd)
+ (writable? #t)))
+ '())
+ ;; Add the user mappings *after* the current working directory
+ ;; so that a user can layer bind mounts on top of it.
+ user-mappings))
;; Mappings for the union closure of all inputs.
(map (lambda (dir)
(file-system-mapping