summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorIan Eure <ian@retrospec.tv>2024-04-07 12:20:59 -0700
committerLudovic Courtès <ludo@gnu.org>2024-05-04 19:14:27 +0200
commitef8ab6ab66c4d629699d175938ef1912941d4dce (patch)
treebaa3fdcf3bd8a0e9d66cef0621f0b48590f23942 /guix
parentdde37247fa9d56b26b8967bb4d70a7598ab2c330 (diff)
gnu: guix-configuration: Improve offload build-machines.
It’s currently difficult to programmatically add a build-machine, because the `service-extension' mechanism is the only facility which can do that. It relies on the `guix-service-type', ala: (service-extension guix-service-type (guix-extension (build-machines (list ...)))) ...but `guix-service-type' is already instantiated as part of `%base-services', and replacing it may lose other configuration, like substitute servers and authorized keys. Additionally, a default value of `#f' for the build-machines field requires guarding uses of the field with: (or (guix-build-machines config) '()) Changing the default to be the empty list avoids that. One can now add build-machines with code such as: (modify-services %base-services (guix-service-type config => (guix-configuration (inherit config) (authorized-keys (cons %build-machine-key (guix-configuration-authorized-keys config))) (build-machines (cons #~(build-machine ...) (guix-configuration-build-machines config)))))) * gnu/services/base.scm (guix-configuration): Rename `guix-build-machines' to `guix-configuration-build-machines' and export it. Change the default from `#f' to the empty list. * gnu/services/base.scm (guix-activation): Update the build-machines test and reverse the conditions. Change-Id: I6780c6a5579fd9d4b4f22ee2b2bf7ba7a0454407 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'guix')
0 files changed, 0 insertions, 0 deletions