From 1c52181f33ec6c2b91f1361f7251769dd29c6ef2 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 3 Nov 2015 17:23:10 +0100 Subject: services: Add 'guix-publish-service'. * gnu/services/base.scm (): New record type. (guix-publish-dmd-service): New procedure. (%guix-publish-accounts, guix-publish-service-type): New variables. (guix-publish-service): New procedure. * doc/guix.texi (Invoking guix publish): Add xref to 'guix-publish-service' anchor. (Base Services): Document 'guix-publish-service'. --- doc/guix.texi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'doc/guix.texi') diff --git a/doc/guix.texi b/doc/guix.texi index 2ec25b21a1..996192c0ea 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -4918,6 +4918,11 @@ Reference Manual}) on @var{port} (37146 by default). This is used 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}}). + @node Invoking guix challenge @section Invoking @command{guix challenge} @@ -6428,6 +6433,17 @@ Return a service to load console keymap from @var{file} using @command{loadkeys} command. @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}). + +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 + @node Networking Services @subsubsection Networking Services -- cgit v1.2.3