aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-03-23 14:00:29 +0100
committerLudovic Courtès <ludo@gnu.org>2017-03-24 00:23:29 +0100
commitf1e900a3b8267846eb3909fbf86e681cbc56203d (patch)
tree8d1ab3c6a6ed4364e3089da578bfa276d6f3f816
parent183303b3efe50c344d4f3644edcdf9f02792aaa3 (diff)
downloadguix-f1e900a3b8267846eb3909fbf86e681cbc56203d.tar
guix-f1e900a3b8267846eb3909fbf86e681cbc56203d.tar.gz
doc: Document 'guix-publish-service-type' instead of 'guix-publish-service'.
* doc/guix.texi (Base Services): Document 'guix-publish-service-type' and 'guix-configuration'. Remove 'guix-publish-service'. (Invoking guix publish): Mention 'guix-publish-service-type'. * gnu/services/base.scm (guix-publish-service): Mark as deprecated. (<guix-configuration>): Export getters.
-rw-r--r--doc/guix.texi33
-rw-r--r--gnu/services/base.scm4
2 files changed, 29 insertions, 8 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index b57e219562..b452b087f1 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -6551,9 +6551,9 @@ primarily for debugging a running @command{guix publish} server.
@end table
Enabling @command{guix publish} on a GuixSD system is a one-liner: just
-add a call to @code{guix-publish-service} in the @code{services} field
-of the @code{operating-system} declaration (@pxref{guix-publish-service,
-@code{guix-publish-service}}).
+instantiate a @code{guix-publish-service-type} service in the @code{services} field
+of the @code{operating-system} declaration (@pxref{guix-publish-service-type,
+@code{guix-publish-service-type}}).
If you are instead running Guix on a ``foreign distro'', follow these
instructions:”
@@ -9007,17 +9007,34 @@ uses the @code{ps2} protocol, which works for both USB and PS/2 mice.
This service is not part of @var{%base-services}.
@end deffn
-@anchor{guix-publish-service}
-@deffn {Scheme Procedure} guix-publish-service [#:guix @var{guix}] @
- [#:port 80] [#:host "localhost"]
-Return a service that runs @command{guix publish} listening on @var{host}
-and @var{port} (@pxref{Invoking guix publish}).
+@anchor{guix-publish-service-type}
+@deffn {Scheme Variable} guix-publish-service-type @var{config}
+This is the service type for @command{guix publish} (@pxref{Invoking
+guix publish}). @var{config} must be a @code{guix-configuration}
+object, as described below.
This assumes that @file{/etc/guix} already contains a signing key pair as
created by @command{guix archive --generate-key} (@pxref{Invoking guix
archive}). If that is not the case, the service will fail to start.
@end deffn
+@deftp {Data Type} guix-publish-configuration
+Data type representing the configuration of the @code{guix publish}
+service.
+
+@table @asis
+@item @code{guix} (default: @code{guix})
+The Guix package to use.
+
+@item @code{port} (default: @code{80})
+The TCP port to listen for connections.
+
+@item @code{host} (default: @code{"localhost"})
+The host (and thus, network interface) to listen to. Use
+@code{"0.0.0.0"} to listen on all the network interfaces.
+@end table
+@end deftp
+
@anchor{rngd-service}
@deffn {Scheme Procedure} rngd-service [#:rng-tools @var{rng-tools}] @
[#:device "/dev/hwrng"]
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 77efef15eb..0de83f36c8 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -124,6 +124,9 @@
guix-service-type
guix-publish-configuration
guix-publish-configuration?
+ guix-publish-configuration-guix
+ guix-publish-configuration-port
+ guix-publish-configuration-host
guix-publish-service
guix-publish-service-type
@@ -1475,6 +1478,7 @@ and @var{port} (@pxref{Invoking guix publish}).
This assumes that @file{/etc/guix} already contains a signing key pair as
created by @command{guix archive --generate-key} (@pxref{Invoking guix
archive}). If that is not the case, the service will fail to start."
+ ;; Deprecated.
(service guix-publish-service-type
(guix-publish-configuration (guix guix) (port port) (host host))))