diff options
| author | Ricardo Wurmus <rekado@elephly.net> | 2022-12-01 19:50:36 +0100 |
|---|---|---|
| committer | Ricardo Wurmus <rekado@elephly.net> | 2022-12-01 19:52:13 +0100 |
| commit | 1a63aea94340f6a24ac09e1c348401e9dfd05395 (patch) | |
| tree | f8ed94ab5d8d2bcc4cb48ecc0df45040ecffce77 /gnu | |
| parent | df25165530352161d6110466b2c9dbae7dc7e282 (diff) | |
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.
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/system/linux-container.scm | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/gnu/system/linux-container.scm b/gnu/system/linux-container.scm index 69080bcacb6..c2fd55d48ec 100644 --- a/gnu/system/linux-container.scm +++ b/gnu/system/linux-container.scm | |||
| @@ -121,9 +121,7 @@ containerized OS. EXTRA-FILE-SYSTEMS is a list of file systems to add to OS." | |||
| 121 | ;; different configs that are better suited to containers. | 121 | ;; different configs that are better suited to containers. |
| 122 | (append (list console-font-service-type | 122 | (append (list console-font-service-type |
| 123 | mingetty-service-type | 123 | mingetty-service-type |
| 124 | agetty-service-type | 124 | agetty-service-type) |
| 125 | ;; Reinstantiated below with smaller caches. | ||
| 126 | nscd-service-type) | ||
| 127 | (if shared-network? | 125 | (if shared-network? |
| 128 | ;; Replace these with dummy-networking-service-type below. | 126 | ;; Replace these with dummy-networking-service-type below. |
| 129 | (list | 127 | (list |
| @@ -134,17 +132,13 @@ containerized OS. EXTRA-FILE-SYSTEMS is a list of file systems to add to OS." | |||
| 134 | (list)))) | 132 | (list)))) |
| 135 | 133 | ||
| 136 | (define services-to-add | 134 | (define services-to-add |
| 137 | (append | 135 | ;; Many Guix services depend on a 'networking' shepherd |
| 138 | ;; Many Guix services depend on a 'networking' shepherd | 136 | ;; service, so make sure to provide a dummy 'networking' |
| 139 | ;; service, so make sure to provide a dummy 'networking' | 137 | ;; service when we are sure that networking is already set up |
| 140 | ;; service when we are sure that networking is already set up | 138 | ;; in the host and can be used. That prevents double setup. |
| 141 | ;; in the host and can be used. That prevents double setup. | 139 | (if shared-network? |
| 142 | (if shared-network? | 140 | (list (service dummy-networking-service-type)) |
| 143 | (list (service dummy-networking-service-type)) | 141 | '())) |
| 144 | '()) | ||
| 145 | (list | ||
| 146 | (nscd-service (nscd-configuration | ||
| 147 | (caches %nscd-container-caches)))))) | ||
| 148 | 142 | ||
| 149 | (operating-system | 143 | (operating-system |
| 150 | (inherit os) | 144 | (inherit os) |
| @@ -155,7 +149,11 @@ containerized OS. EXTRA-FILE-SYSTEMS is a list of file systems to add to OS." | |||
| 155 | (services (append (remove (lambda (service) | 149 | (services (append (remove (lambda (service) |
| 156 | (memq (service-kind service) | 150 | (memq (service-kind service) |
| 157 | services-to-drop)) | 151 | services-to-drop)) |
| 158 | (operating-system-user-services os)) | 152 | (modify-services (operating-system-user-services os) |
| 153 | (nscd-service-type | ||
| 154 | config => (nscd-configuration | ||
| 155 | (inherit config) | ||
| 156 | (caches %nscd-container-caches))))) | ||
| 159 | services-to-add)) | 157 | services-to-add)) |
| 160 | (file-systems (append (map mapping->fs | 158 | (file-systems (append (map mapping->fs |
| 161 | (if shared-network? | 159 | (if shared-network? |
