aboutsummaryrefslogtreecommitdiff
path: root/gnu/system/linux-container.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/system/linux-container.scm')
-rw-r--r--gnu/system/linux-container.scm48
1 files changed, 23 insertions, 25 deletions
diff --git a/gnu/system/linux-container.scm b/gnu/system/linux-container.scm
index 3acc579a6b..2e20379473 100644
--- a/gnu/system/linux-container.scm
+++ b/gnu/system/linux-container.scm
@@ -87,30 +87,28 @@ that will be shared with the host system."
#:container? #t)))
(define script
- #~(begin
- (use-modules (gnu build linux-container)
- (guix build utils))
+ (with-imported-modules '((guix config)
+ (guix utils)
+ (guix build utils)
+ (guix build syscalls)
+ (guix build bournish)
+ (gnu build file-systems)
+ (gnu build linux-container))
+ #~(begin
+ (use-modules (gnu build linux-container)
+ (guix build utils))
- (call-with-container '#$specs
- (lambda ()
- (setenv "HOME" "/root")
- (setenv "TMPDIR" "/tmp")
- (setenv "GUIX_NEW_SYSTEM" #$os-drv)
- (for-each mkdir-p '("/run" "/bin" "/etc" "/home" "/var"))
- (primitive-load (string-append #$os-drv "/boot")))
- ;; A range of 65536 uid/gids is used to cover 16 bits worth of
- ;; users and groups, which is sufficient for most cases.
- ;;
- ;; See: http://www.freedesktop.org/software/systemd/man/systemd-nspawn.html#--private-users=
- #:host-uids 65536)))
+ (call-with-container '#$specs
+ (lambda ()
+ (setenv "HOME" "/root")
+ (setenv "TMPDIR" "/tmp")
+ (setenv "GUIX_NEW_SYSTEM" #$os-drv)
+ (for-each mkdir-p '("/run" "/bin" "/etc" "/home" "/var"))
+ (primitive-load (string-append #$os-drv "/boot")))
+ ;; A range of 65536 uid/gids is used to cover 16 bits worth of
+ ;; users and groups, which is sufficient for most cases.
+ ;;
+ ;; See: http://www.freedesktop.org/software/systemd/man/systemd-nspawn.html#--private-users=
+ #:host-uids 65536))))
- (gexp->script "run-container" script
- #:modules '((ice-9 match)
- (srfi srfi-98)
- (guix config)
- (guix utils)
- (guix build utils)
- (guix build syscalls)
- (guix build bournish)
- (gnu build file-systems)
- (gnu build linux-container))))))
+ (gexp->script "run-container" script))))