mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
guix home: ‘container’ explicitly mounts $HOME and /run/user/1000.
* guix/scripts/home.scm (spawn-home-container): Pass #:mounts to ‘eval/container’. Change-Id: I1986c1411711cebaf623f97897d91436d8167037
This commit is contained in:
parent
d4c3b31b86
commit
acc4215644
1 changed files with 15 additions and 2 deletions
|
@ -3,7 +3,7 @@
|
||||||
;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
|
;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
|
||||||
;;; Copyright © 2021 Pierre Langlois <pierre.langlois@gmx.com>
|
;;; Copyright © 2021 Pierre Langlois <pierre.langlois@gmx.com>
|
||||||
;;; Copyright © 2021 Oleg Pykhalov <go.wigust@gmail.com>
|
;;; Copyright © 2021 Oleg Pykhalov <go.wigust@gmail.com>
|
||||||
;;; Copyright © 2022-2023 Ludovic Courtès <ludo@gnu.org>
|
;;; Copyright © 2022-2023, 2025 Ludovic Courtès <ludo@gnu.org>
|
||||||
;;; Copyright © 2022 Arun Isaac <arunisaac@systemreboot.net>
|
;;; Copyright © 2022 Arun Isaac <arunisaac@systemreboot.net>
|
||||||
;;; Copyright © 2022 Antero Mejr <antero@mailbox.org>
|
;;; Copyright © 2022 Antero Mejr <antero@mailbox.org>
|
||||||
;;;
|
;;;
|
||||||
|
@ -38,7 +38,8 @@
|
||||||
#:use-module ((gnu system) #:select (operating-system?
|
#:use-module ((gnu system) #:select (operating-system?
|
||||||
operating-system-user-services))
|
operating-system-user-services))
|
||||||
#:autoload (gnu system linux-container) (eval/container)
|
#:autoload (gnu system linux-container) (eval/container)
|
||||||
#:autoload (gnu system file-systems) (file-system-mapping
|
#:autoload (gnu system file-systems) (file-system
|
||||||
|
file-system-mapping
|
||||||
file-system-mapping-source
|
file-system-mapping-source
|
||||||
file-system-mapping->bind-mount
|
file-system-mapping->bind-mount
|
||||||
specification->file-system-mapping
|
specification->file-system-mapping
|
||||||
|
@ -363,6 +364,18 @@ immediately. Return the exit status of the process in the container."
|
||||||
#:namespaces (if network?
|
#:namespaces (if network?
|
||||||
(delq 'net %namespaces) ; share host network
|
(delq 'net %namespaces) ; share host network
|
||||||
%namespaces)
|
%namespaces)
|
||||||
|
#:mounts (list (file-system
|
||||||
|
(device "none")
|
||||||
|
(mount-point
|
||||||
|
(in-vicinity "/run/user" ;for shepherd & co.
|
||||||
|
(number->string uid)))
|
||||||
|
(type "tmpfs")
|
||||||
|
(check? #f))
|
||||||
|
(file-system ;writable home
|
||||||
|
(device "none")
|
||||||
|
(mount-point home-directory)
|
||||||
|
(type "tmpfs")
|
||||||
|
(check? #f)))
|
||||||
#:mappings (append network-mappings mappings)
|
#:mappings (append network-mappings mappings)
|
||||||
#:guest-uid uid
|
#:guest-uid uid
|
||||||
#:guest-gid gid))
|
#:guest-gid gid))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue