guix/gnu
Ian Eure ef8ab6ab66
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>
2024-05-04 19:14:27 +02:00
..
bootloader
build
home home: services: bash: Move default PS1 prompt to bashrc 2024-04-29 23:54:13 +02:00
installer
machine
packages gnu: gnucash: Update to 5.6. 2024-05-04 19:14:27 +02:00
services gnu: guix-configuration: Improve offload build-machines. 2024-05-04 19:14:27 +02:00
system linux-initrd: Further strip the static Guile. 2024-04-29 22:52:08 +02:00
tests
artwork.scm
bootloader.scm
ci.scm
compression.scm
home.scm
image.scm
installer.scm
local.mk gnu: perl-finance-quote: Update perl-finance-quote. 2024-05-04 19:14:26 +02:00
machine.scm
packages.scm
services.scm
system.scm system: Fix duplicate nss-certs check. 2024-04-28 09:53:46 -04:00
tests.scm