diff options
author | Marius Bakke <mbakke@fastmail.com> | 2019-03-14 16:30:19 +0100 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2019-03-14 16:30:19 +0100 |
commit | 19008a22d18e772062952034c58a15ed341df3b5 (patch) | |
tree | 3a7fb9b4abe5cbac3f7edd5d5c76abd993fad255 /gnu/system/linux-container.scm | |
parent | 520ae432d446010ed6a5233c8abfda88a945926c (diff) | |
parent | c958c31caefb20c32cf89caea7d4668d7021a92b (diff) | |
download | guix-patches-19008a22d18e772062952034c58a15ed341df3b5.tar guix-patches-19008a22d18e772062952034c58a15ed341df3b5.tar.gz |
Merge branch 'staging' into core-updates
Diffstat (limited to 'gnu/system/linux-container.scm')
-rw-r--r-- | gnu/system/linux-container.scm | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/gnu/system/linux-container.scm b/gnu/system/linux-container.scm index bceea41332..3fe3482d7f 100644 --- a/gnu/system/linux-container.scm +++ b/gnu/system/linux-container.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015 David Thompson <davet@gnu.org> -;;; Copyright © 2016, 2017 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2016, 2017, 2019 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -28,6 +28,7 @@ #:use-module (guix modules) #:use-module (gnu build linux-container) #:use-module (gnu services) + #:use-module (gnu services base) #:use-module (gnu system) #:use-module (gnu system file-systems) #:export (system-container @@ -54,8 +55,19 @@ containerized OS." (file-system (inherit (file-system-mapping->bind-mount fs)) (needed-for-boot? #t))) + (define useless-services + ;; Services that make no sense in a container. Those that attempt to + ;; access /dev/tty[0-9] in particular cannot work in a container. + (list console-font-service-type + mingetty-service-type + agetty-service-type)) + (operating-system (inherit os) (swap-devices '()) ; disable swap + (services (remove (lambda (service) + (memq (service-kind service) + useless-services)) + (operating-system-user-services os))) (file-systems (append (map mapping->fs (cons %store-mapping mappings)) %container-file-systems user-file-systems)))) |