@@ -19316,7 +19316,8 @@ Base Services
@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
@@ -19329,7 +19330,8 @@ Base Services
(guix-configuration
(build-machines
(list #~(build-machine (name "foo.example.org") @dots{})
- #~(build-machine (name "bar.example.org") @dots{}))))
+ #~(list (build-machine (name "bar.example.org") @dots{})
+ (build-machine (name "foobaz.example.org") @dots{})))))
@end lisp
Additional build machines may be added @i{via} the @code{guix-extension}
@@ -19385,7 +19387,8 @@ Base Services
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
@@ -1765,7 +1765,13 @@ (define (guix-machines-files-installation machines)
(mkdir-p (dirname machines-file)))
;; Installed the declared machines file.
- (symlink #+(scheme-file "machines.scm" machines)
+ (symlink #+(scheme-file "machines.scm"
+ `(apply append
+ (map (lambda (entry)
+ (if (list? entry)
+ entry
+ (list entry)))
+ ,machines)))
machines-file))))
(define-record-type* <guix-configuration>