Hartmut Goebel <h.goe...@crazy-compilers.com> skribis:

> * .gitignore: add etc/guix-publish.conf and /etc/guix-publish.service.
> * etc/guix-publish.conf.in: New file.
> * etc/guix-publish.service.in: New file.
> * nix/local.mk (etc/guix-%.service, etc/guix-%.conf): Generalized former
>   build-rules for by using patterns.
>   (nodist_systemdservice_DATA): Add etc/guix-publish.service, update
>   comment.
>   (nodist_upstartjob_DATA): Add etc/guix-publish.conf, update comment.
> * doc/guix.texi (Binary Installation): Add step for setting up "guix
>   publish" to start at system start using the new files.

Good idea!

> --- a/doc/guix.texi
> +++ b/doc/guix.texi
> @@ -504,6 +504,40 @@ To use substitutes from @code{hydra.gnu.org} or one of 
> its mirrors
>  @example
>  # guix archive --authorize < ~root/.guix-profile/share/guix/hydra.gnu.org.pub
>  @end example
> +
> +@item
> +(Optional) You may want to publish the content of your store for other
> +systems in your network. For this run
> +@example
> +# guix archive --generate-key
> +# useradd -U -d /var/empty -s `which nologin`    \
> +           -c "Guix publish user" --system    \
> +           guixpublish
> +@end example
> +
> +Set @command{guix publish} to automatically start on boot.
> +
> +If your host distro uses the systemd init system, this can be achieved
> +with these commands:
> +
> +@example
> +# ln -s ~root/.guix-profile/lib/systemd/system/guix-publish.service \
> +        /etc/systemd/system/
> +# systemctl start guix-publish && systemctl enable guix-publish
> +@end example
> +
> +If your host distro uses the Upstart init system:
> +
> +@example
> +# ln -s ~root/.guix-profile/lib/upstart/system/guix-publish.conf /etc/init/
> +# start guix-publish
> +@end example
> +
> +Otherwise, you can still start @command{guix publish} manually with:
> +
> +@example
> +# ~root/.guix-profile/bin/guix publish --user=guixpublish
> +@end example
>  @end enumerate

I think this should rather go to “Invoking guix publish”, to avoid
making “Binary Installation” too intimidating (and because users do not
initially care about running ‘guix publish’).  WDYT?

Also, I think it would be enough to add a cross-reference to “Invoking
guix archive” where we mention that a key needs to be generated.

Last, I think we should simply recommend user ‘nobody’, which we can
expect to be already present.  It does the job and will make the
instructions shorter.

WDYT?

The rest LGTM, thanks!

Ludo’.

Reply via email to