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.
This commit is contained in:
parent
0971f8bd88
commit
a655d504aa
|
@ -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
|
;; /bin/sh, the current working directory, and possibly networking
|
||||||
;; configuration files within the container.
|
;; configuration files within the container.
|
||||||
(mappings
|
(mappings
|
||||||
(override-user-mappings
|
(append
|
||||||
user home
|
(override-user-mappings
|
||||||
(append user-mappings
|
user home
|
||||||
;; Current working directory.
|
(append user-mappings
|
||||||
(list (file-system-mapping
|
;; Current working directory.
|
||||||
(source cwd)
|
(list (file-system-mapping
|
||||||
(target cwd)
|
(source cwd)
|
||||||
(writable? #t)))
|
(target cwd)
|
||||||
;; When in Rome, do as Nix build.cc does: Automagically
|
(writable? #t)))))
|
||||||
;; map common network configuration files.
|
;; When in Rome, do as Nix build.cc does: Automagically
|
||||||
(if network?
|
;; map common network configuration files.
|
||||||
%network-file-mappings
|
(if network?
|
||||||
'())
|
%network-file-mappings
|
||||||
;; Mappings for the union closure of all inputs.
|
'())
|
||||||
(map (lambda (dir)
|
;; Mappings for the union closure of all inputs.
|
||||||
(file-system-mapping
|
(map (lambda (dir)
|
||||||
(source dir)
|
(file-system-mapping
|
||||||
(target dir)
|
(source dir)
|
||||||
(writable? #f)))
|
(target dir)
|
||||||
reqs))))
|
(writable? #f)))
|
||||||
|
reqs)))
|
||||||
(file-systems (append %container-file-systems
|
(file-systems (append %container-file-systems
|
||||||
(map file-system-mapping->bind-mount
|
(map file-system-mapping->bind-mount
|
||||||
mappings))))
|
mappings))))
|
||||||
|
|
Loading…
Reference in New Issue