From: "Ludovic Courtès" <ludo@gnu.org>
To: Ian Eure <ian@retrospec.tv>
Cc: 70263-done@debbugs.gnu.org
Subject: bug#70263: [PATCH] gnu: guix-configuration: Improve offload build-machines.
Date: Sat, 04 May 2024 19:12:59 +0200 [thread overview]
Message-ID: <87r0ehsdpg.fsf@gnu.org> (raw)
In-Reply-To: <7d5b40b2df8b68e1aafc881080680824e6655460.1712517547.git.ian@retrospec.tv> (Ian Eure's message of "Sun, 7 Apr 2024 12:20:59 -0700")
Hi Ian,
Ian Eure <ian@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’.
prev parent reply other threads:[~2024-05-04 17:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-07 19:20 [bug#70263] [PATCH] gnu: guix-configuration: Improve offload build-machines Ian Eure
2024-05-04 17:12 ` Ludovic Courtès [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r0ehsdpg.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=70263-done@debbugs.gnu.org \
--cc=ian@retrospec.tv \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).