summaryrefslogtreecommitdiff
path: root/doc/guix.texi
diff options
context:
space:
mode:
authorIan Eure <ian@retrospec.tv>2025-12-28 09:17:14 -0800
committerIan Eure <ian@retrospec.tv>2025-12-28 09:57:09 -0800
commit3dec0dbf14bb5224d12dbd3ecebf50dcc504f5c9 (patch)
tree54decc53aa7bbc0f66abf5a252cfd8531252636f /doc/guix.texi
parent93e4c03938ae2c161885b615d66c613a544fc8ac (diff)
gnu: services: Support channels when extending guix-service-type.guix-extension-channels
Most of the configuration for guix-service-type can be extended (build machines, substitutes, etc), but channels currently cannot. This commit adds support for that. * gnu/services/base.scm (guix-extension): Add `channels'. (guix-extension-merge): Merge channels. (guix-service-type): Add extension channels. * doc/guix.texi (Getting Substitutes from Other Servers): Use a service extension instead of modify-services. (Base Services, guix-extension): Document channel field. Change-Id: I26cd0556a536f49ecc61662fc10af080d6c6dc9f
Diffstat (limited to 'doc/guix.texi')
-rw-r--r--doc/guix.texi31
1 files changed, 13 insertions, 18 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index c504ec06cd7..a1f7ee5e862 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -4018,12 +4018,9 @@ them in the specified order. You also need to explicitly authorize the
4018public keys of substitute servers to instruct Guix to accept the 4018public keys of substitute servers to instruct Guix to accept the
4019substitutes they sign. 4019substitutes they sign.
4020 4020
4021On Guix System, this is achieved by modifying the configuration of the 4021On Guix System, this is achieved by extending the configuration of the
4022@code{guix} service. Since the @code{guix} service is part of the 4022@code{guix} service. @pxref{Service Composition, Service extensions}
4023default lists of services, @code{%base-services} and 4023allow users to easily add new configuration information.
4024@code{%desktop-services}, you can use @code{modify-services} to change
4025its configuration and add the URLs and substitute keys that you want
4026(@pxref{Service Reference, @code{modify-services}}).
4027 4024
4028As an example, suppose you want to fetch substitutes from 4025As an example, suppose you want to fetch substitutes from
4029@code{guix.example.org} and to authorize the signing key of that server, 4026@code{guix.example.org} and to authorize the signing key of that server,
@@ -4035,18 +4032,13 @@ configuration will look something like:
4035(operating-system 4032(operating-system
4036 ;; @dots{} 4033 ;; @dots{}
4037 (services 4034 (services
4038 ;; Assume we're starting from '%desktop-services'. Replace it 4035 (cons
4039 ;; with the list of services you're actually using. 4036 (simple-service
4040 (modify-services %desktop-services 4037 'my-guix-configuration guix-service-type
4041 (guix-service-type config => 4038 (guix-extension
4042 (guix-configuration 4039 (substitute-urls (list "https://guix.example.org"))
4043 (inherit config) 4040 (authorized-keys (list (local-file "./key.pub")))))
4044 (substitute-urls 4041 %desktop-services)))
4045 (append (list "https://guix.example.org")
4046 %default-substitute-urls))
4047 (authorized-keys
4048 (append (list (local-file "./key.pub"))
4049 %default-authorized-guix-keys)))))))
4050@end lisp 4042@end lisp
4051 4043
4052This assumes that the file @file{key.pub} contains the signing key of 4044This assumes that the file @file{key.pub} contains the signing key of
@@ -20702,6 +20694,9 @@ a guix service extension.
20702@xref{Service Composition}, for more information. 20694@xref{Service Composition}, for more information.
20703 20695
20704@table @asis 20696@table @asis
20697@item @code{channels} (default: @code{'()})
20698A list of objects where each element is a channel record.
20699
20705@item @code{authorized-keys} (default: @code{'()}) 20700@item @code{authorized-keys} (default: @code{'()})
20706A list of file-like objects where each element contains a public key. 20701A list of file-like objects where each element contains a public key.
20707 20702