summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/guix.texi6
-rw-r--r--gnu/services/base.scm8
2 files changed, 11 insertions, 3 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index 4c0f6b54e5..4a196ce04a 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -19399,7 +19399,8 @@ and DNS-SD.
@anchor{guix-configuration-build-machines}
@item @code{build-machines} (default: @code{#f})
This field must be either @code{#f} or a list of gexps evaluating to a
-@code{build-machine} record (@pxref{Daemon Offload Setup}).
+@code{build-machine} record or to a list of @code{build-machine} records
+(@pxref{Daemon Offload Setup}).
When it is @code{#f}, the @file{/etc/guix/machines.scm} file is left
untouched. Otherwise, the list of of gexps is written to
@@ -19468,7 +19469,8 @@ A list of file-like objects where each element contains a public key.
A list of strings where each element is a substitute URL.
@item @code{build-machines} (default: @code{'()})
-A list of gexps that evaluate to @code{build-machine} records
+A list of gexps that evaluate to @code{build-machine} records or to a list of
+@code{build-machine} records.
(@pxref{Daemon Offload Setup}).
Using this field, a service may add new build machines to receive builds
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index dc001fdef6..6539bfd6ce 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -1767,7 +1767,13 @@ archive' public keys, with GUIX."
(mkdir-p (dirname machines-file)))
;; Installed the declared machines file.
- (symlink #+(scheme-file "machines.scm" machines)
+ (symlink #+(scheme-file "machines.scm"
+ #~((@ (srfi srfi-1) append-map)
+ (lambda (entry)
+ (if (build-machine? entry)
+ (list entry)
+ entry))
+ #$machines))
machines-file))))
(define-record-type* <guix-configuration>