aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Dong <accounts@carldong.me>2019-06-29 16:59:22 -0400
committerCarl Dong <contact@carldong.me>2019-07-08 10:33:19 -0400
commita655d504aa1dc04ab9c8916f2022f07ca89ceb3b (patch)
treee7b8bb8b3a0b62079d9298dea1bafb3c57f0a1c9
parent0971f8bd884b6e92b77d9e12030cd58279699183 (diff)
downloadguix-a655d504aa1dc04ab9c8916f2022f07ca89ceb3b.tar
guix-a655d504aa1dc04ab9c8916f2022f07ca89ceb3b.tar.gz
scripts: environment: Only rewrite user-specified mappings.
* guix/scripts/environment.scm (launch-environment/container): Only apply override-user-mappings to user-mappings and cwd. Do not apply to network configuration mapping and inputs.
-rw-r--r--guix/scripts/environment.scm41
1 files changed, 21 insertions, 20 deletions
diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
index c1341628a8..949ba1124f 100644
--- a/guix/scripts/environment.scm
+++ b/guix/scripts/environment.scm
@@ -479,26 +479,27 @@ will be used for the passwd entry. LINK-PROFILE? creates a symbolic link from
;; /bin/sh, the current working directory, and possibly networking
;; configuration files within the container.
(mappings
- (override-user-mappings
- user home
- (append user-mappings
- ;; Current working directory.
- (list (file-system-mapping
- (source cwd)
- (target cwd)
- (writable? #t)))
- ;; When in Rome, do as Nix build.cc does: Automagically
- ;; map common network configuration files.
- (if network?
- %network-file-mappings
- '())
- ;; Mappings for the union closure of all inputs.
- (map (lambda (dir)
- (file-system-mapping
- (source dir)
- (target dir)
- (writable? #f)))
- reqs))))
+ (append
+ (override-user-mappings
+ user home
+ (append user-mappings
+ ;; Current working directory.
+ (list (file-system-mapping
+ (source cwd)
+ (target cwd)
+ (writable? #t)))))
+ ;; When in Rome, do as Nix build.cc does: Automagically
+ ;; map common network configuration files.
+ (if network?
+ %network-file-mappings
+ '())
+ ;; Mappings for the union closure of all inputs.
+ (map (lambda (dir)
+ (file-system-mapping
+ (source dir)
+ (target dir)
+ (writable? #f)))
+ reqs)))
(file-systems (append %container-file-systems
(map file-system-mapping->bind-mount
mappings))))