diff options
Diffstat (limited to 'gnu/system/linux-container.scm')
| -rw-r--r-- | gnu/system/linux-container.scm | 43 |
1 files changed, 23 insertions, 20 deletions
diff --git a/gnu/system/linux-container.scm b/gnu/system/linux-container.scm index c780b68fba4..c1705f491cc 100644 --- a/gnu/system/linux-container.scm +++ b/gnu/system/linux-container.scm | |||
| @@ -7,6 +7,7 @@ | |||
| 7 | ;;; Copyright © 2022 Ricardo Wurmus <rekado@elephly.net> | 7 | ;;; Copyright © 2022 Ricardo Wurmus <rekado@elephly.net> |
| 8 | ;;; Copyright © 2023 Pierre Langlois <pierre.langlois@gmx.com> | 8 | ;;; Copyright © 2023 Pierre Langlois <pierre.langlois@gmx.com> |
| 9 | ;;; Copyright © 2024 Leo Nikkilä <hello@lnikki.la> | 9 | ;;; Copyright © 2024 Leo Nikkilä <hello@lnikki.la> |
| 10 | ;;; Copyright © 2024 Andreas Enge <andreas@enge.fr> | ||
| 10 | ;;; | 11 | ;;; |
| 11 | ;;; This file is part of GNU Guix. | 12 | ;;; This file is part of GNU Guix. |
| 12 | ;;; | 13 | ;;; |
| @@ -151,26 +152,28 @@ containerized OS. EXTRA-FILE-SYSTEMS is a list of file systems to add to OS." | |||
| 151 | (swap-devices '()) ; disable swap | 152 | (swap-devices '()) ; disable swap |
| 152 | (services | 153 | (services |
| 153 | (append services-to-add | 154 | (append services-to-add |
| 154 | (filter-map (lambda (s) | 155 | (filter-map |
| 155 | (cond ((memq (service-kind s) services-to-drop) | 156 | (lambda (s) |
| 156 | #f) | 157 | (let ((kind (service-kind s)) |
| 157 | ((eq? nscd-service-type (service-kind s)) | 158 | (value (service-value s))) |
| 158 | (service nscd-service-type | 159 | (cond ((memq kind services-to-drop) |
| 159 | (nscd-configuration | 160 | #f) |
| 160 | (inherit (service-value s)) | 161 | ((eq? nscd-service-type kind) |
| 161 | (caches %nscd-container-caches)))) | 162 | (service nscd-service-type |
| 162 | ((eq? guix-service-type (service-kind s)) | 163 | (nscd-configuration |
| 163 | ;; Pass '--disable-chroot' so that | 164 | (inherit value) |
| 164 | ;; guix-daemon can build thing even in | 165 | (caches %nscd-container-caches)))) |
| 165 | ;; Docker without '--privileged'. | 166 | ((and (eq? guix-service-type kind) |
| 166 | (service guix-service-type | 167 | (eq? (guix-configuration-chroot? value) |
| 167 | (guix-configuration | 168 | 'default)) |
| 168 | (inherit (service-value s)) | 169 | ;; If chroot? is 'default, it should become #f |
| 169 | (extra-options | 170 | ;; so that guix-daemon can build things even in |
| 170 | (cons "--disable-chroot" | 171 | ;; Docker without '--privileged'. |
| 171 | (guix-configuration-extra-options | 172 | (service guix-service-type |
| 172 | (service-value s))))))) | 173 | (guix-configuration |
| 173 | (else s))) | 174 | (inherit value) |
| 175 | (chroot? #f)))) | ||
| 176 | (else s)))) | ||
| 174 | (operating-system-user-services os)))) | 177 | (operating-system-user-services os)))) |
| 175 | (file-systems (append (map mapping->fs | 178 | (file-systems (append (map mapping->fs |
| 176 | (if shared-network? | 179 | (if shared-network? |
