mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-25 20:19:18 -05:00
linux-container: Do not replace nscd-service-type.
* gnu/system/linux-container.scm (containerized-operating-system): Respect customizations to the nscd-service-type and only modify the caches field.
This commit is contained in:
parent
df25165530
commit
1a63aea943
1 changed files with 13 additions and 15 deletions
|
@ -121,9 +121,7 @@ (define services-to-drop
|
||||||
;; different configs that are better suited to containers.
|
;; different configs that are better suited to containers.
|
||||||
(append (list console-font-service-type
|
(append (list console-font-service-type
|
||||||
mingetty-service-type
|
mingetty-service-type
|
||||||
agetty-service-type
|
agetty-service-type)
|
||||||
;; Reinstantiated below with smaller caches.
|
|
||||||
nscd-service-type)
|
|
||||||
(if shared-network?
|
(if shared-network?
|
||||||
;; Replace these with dummy-networking-service-type below.
|
;; Replace these with dummy-networking-service-type below.
|
||||||
(list
|
(list
|
||||||
|
@ -134,17 +132,13 @@ (define services-to-drop
|
||||||
(list))))
|
(list))))
|
||||||
|
|
||||||
(define services-to-add
|
(define services-to-add
|
||||||
(append
|
;; Many Guix services depend on a 'networking' shepherd
|
||||||
;; Many Guix services depend on a 'networking' shepherd
|
;; service, so make sure to provide a dummy 'networking'
|
||||||
;; service, so make sure to provide a dummy 'networking'
|
;; service when we are sure that networking is already set up
|
||||||
;; service when we are sure that networking is already set up
|
;; in the host and can be used. That prevents double setup.
|
||||||
;; in the host and can be used. That prevents double setup.
|
(if shared-network?
|
||||||
(if shared-network?
|
(list (service dummy-networking-service-type))
|
||||||
(list (service dummy-networking-service-type))
|
'()))
|
||||||
'())
|
|
||||||
(list
|
|
||||||
(nscd-service (nscd-configuration
|
|
||||||
(caches %nscd-container-caches))))))
|
|
||||||
|
|
||||||
(operating-system
|
(operating-system
|
||||||
(inherit os)
|
(inherit os)
|
||||||
|
@ -155,7 +149,11 @@ (define services-to-add
|
||||||
(services (append (remove (lambda (service)
|
(services (append (remove (lambda (service)
|
||||||
(memq (service-kind service)
|
(memq (service-kind service)
|
||||||
services-to-drop))
|
services-to-drop))
|
||||||
(operating-system-user-services os))
|
(modify-services (operating-system-user-services os)
|
||||||
|
(nscd-service-type
|
||||||
|
config => (nscd-configuration
|
||||||
|
(inherit config)
|
||||||
|
(caches %nscd-container-caches)))))
|
||||||
services-to-add))
|
services-to-add))
|
||||||
(file-systems (append (map mapping->fs
|
(file-systems (append (map mapping->fs
|
||||||
(if shared-network?
|
(if shared-network?
|
||||||
|
|
Loading…
Reference in a new issue