services: cuirass-worker-container: Add ‘workers’ configuration field.

* modules/rosenthal/services/cuirass.scm
(cuirass-worker-container-configuration)[workers]: New field.
(%cuirass-worker-container-script): Use it.
This commit is contained in:
Hilton Chain 2025-06-11 09:13:38 +08:00
parent 72a9d12836
commit c6228682d6
No known key found for this signature in database
GPG Key ID: ACC66D09CA528292

View File

@ -44,6 +44,8 @@
this-cuirass-worker-container-configuration
(host-name cuirass-worker-container-host-name)
(server cuirass-worker-container-server)
(workers cuirass-worker-container-workers
(default 1))
(supported-systems cuirass-worker-container-supported-systems
(default (list (%current-system)))
(thunked))
@ -66,7 +68,8 @@
(define %cuirass-worker-container-script
(match-record-lambda <cuirass-worker-container-configuration>
(host-name server supported-systems substitute-urls)
(host-name server workers supported-systems substitute-urls)
(define cuirass-remote-worker-for-container
(service-type
(name 'cuirass-remote-worker)
@ -95,6 +98,7 @@
%cuirass-remote-worker-accounts)))))
(description
"Run the Cuirass remote build worker service.")))
(define os
(operating-system
(bootloader
@ -108,12 +112,12 @@
(type "dummy"))
%base-file-systems))
(kernel linux-libre-lts)
(host-name host-name)
(services
(cons (service cuirass-remote-worker-for-container
(cuirass-remote-worker-configuration
(cuirass (pkg "cuirass-hako"))
(workers workers)
(server server)
(systems supported-systems)
(publish-port 5558)