GNU bug report logs -
#70263
[PATCH] gnu: guix-configuration: Improve offload build-machines.
Previous Next
Reported by: Ian Eure <ian <at> retrospec.tv>
Date: Sun, 7 Apr 2024 19:22:01 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #10 received at 70263-done <at> debbugs.gnu.org (full text, mbox):
Hi Ian,
Ian Eure <ian <at> retrospec.tv> skribis:
> 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.
That makes a lot of sense to me. Applied, thanks!
Ludo’.
This bug report was last modified 1 year and 67 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.