Subject: bug#46961: Nginx and certbot cervices don't play well togther

From: Clément Lassieur <[email-masked]>
Date: Mon, 29 Jan 2024 20:28:29 +0100

Also, I forgot, I think it would be great to have somewhere in the doc
an example of minimal config.scm that works.  I know we can't do proper
testing because we depend of certbot service but that would make it
easier for a lot of people to test it.  Maybe such example is already in
the docs and I haven't seen it though.

Here is the one I used:

--8<---------------cut here---------------start------------->8---
(use-modules (gnu) (gnu tests))
(use-package-modules web)
(use-service-modules certbot networking web)

(operating-system
  (inherit %simple-os)
  (services
   (cons*
    (service dhcp-client-service-type)
    (service nginx-service-type
             (nginx-configuration
              (server-blocks
               (list
                (nginx-server-configuration
                 (listen '("443 ssl"))
                 (server-name '("test.lassieur.org"))
                 (ssl-certificate
                  "/etc/certs/test.lassieur.org/fullchain.pem")
                 (ssl-certificate-key
                  "/etc/certs/test.lassieur.org/privkey.pem"))))))
    (service certbot-service-type
             (certbot-configuration
              (certificates
               (list
                (certificate-configuration
                 (domains '("test.lassieur.org")))))))
    %base-services)))
--8<---------------cut here---------------end--------------->8---