Hi,

I'm exploring how to serve/consume substitutes in the local network using two machines with Guix System installed on them. So far I see two ways of serving substitutes:

1. Running the publish command from a terminal in the server machine. For example:

   sudo guix publish --user=$USER

2. Reconfiguring the server machine to provide the «guix-publish-service-type». For example:

   (service guix-publish-service-type
            (guix-publish-configuration
             (advertise? #true)
             (host "0.0.0.0")
             (port 8001)
             (cache "/var/cache/guix/publish")
             (ttl (* 90 24 3600))))

I like the first option for serving substitutes temporarily and the second one for serving substitutes permanently. Right now I'm more interested in the first option though, but I have a question:

Q1. While serving temporarily seems straightforward, would clients have to reconfigure their systems to add the server IP address and authorizing its signing key? Or can this be done in a faster way (I see a --subsitute-urls in guix commands...)?

If it turns out that clients have to reconfigure their machines to authorize the server, then I think I'd just use the «guix-publish-service-type» for the server instead. One question about this, out of curiosity:

Q2. Is there any reason why the «guix publish» command defaults to accepting connections from any interface while the guix-publish-service-type defaults to localhost only?

Because of the difference in these default values, it took me some time to figure out why I couldn't access http://SERVER_IP:8001/ from the client when trying out the guix publish service.

Thanks in advance,

--
Luis Felipe López Acevedo
https://luis-felipe.gitlab.io/

Attachment: OpenPGP_0x0AB0D067012F08C3.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to