Message ID | cover.1723386101.git.rodion.goritskov@gmail.com |
---|---|
Headers | show |
Series | services: agate: Change variable names and add system test. | expand |
Hi, I'm testing these patches in a qemu VM. I thought I should share that, if I explicitly set the certs field, I get an error: ``` /home/user/config.scm:52:35: error: (agate-configuration (content "/srv/gemini") (certs "/srv/gemini-tls") (log-ip? #f)): extraneous field initializers (certs) ``` Here is the config file: ``` ;; -*- mode: scheme; -*- ;; This is an operating system configuration template ;; for a "bare bones" setup, with no X11 display server. (use-modules (gnu)) (use-service-modules networking ssh web) (use-package-modules screen ssh) (operating-system (host-name "guix") (timezone "America/Anchorage") (locale "en_US.utf8") ;; Boot in "legacy" BIOS mode, assuming /dev/sdX is the ;; target hard disk, and "my-root" is the label of the target ;; root file system. (bootloader (bootloader-configuration (bootloader grub-bootloader) (targets '("/dev/sda")))) ;; It's fitting to support the equally bare bones ‘-nographic’ ;; QEMU option, which also nicely sidesteps forcing QWERTY. (kernel-arguments (list "console=ttyS0,115200")) (file-systems (cons (file-system (device (file-system-label "my-root")) (mount-point "/") (type "ext4")) %base-file-systems)) ;; This is where user accounts are specified. The "root" ;; account is implicit, and is initially created with the ;; empty password. (users (cons (user-account (name "user") (comment "Generic user") (group "users") ;; Adding the account to the "wheel" group ;; makes it a sudoer. Adding it to "audio" ;; and "video" allows the user to play sound ;; and access the webcam. (supplementary-groups '("wheel" "audio" "video"))) %base-user-accounts)) ;; Globally-installed packages. (packages (cons screen %base-packages)) ;; Add services to the baseline: a DHCP client and an SSH ;; server. You may wish to add an NTP service here. (services (append (list (service dhcp-client-service-type) (service agate-service-type (agate-configuration (content "/srv/gemini") (certs "/srv/gemini-tls") (log-ip? #f))) (service openssh-service-type (openssh-configuration (openssh openssh-sans-x) (port-number 2222)))) %base-services))) ```
Hi! Christopher Howard <christopher@librehacker.com> writes: >Hi, I'm testing these patches in a qemu VM. I thought I should share that, if I explicitly set the certs field, I get an error: > > ``` > /home/user/config.scm:52:35: error: (agate-configuration (content "/srv/gemini") (certs "/srv/gemini-tls") (log-ip? #f)): extraneous field initializers (certs) > ``` > This patch (intentionally) renames the field "certs" to the "certificates", as was advised in [1]. I could maintain the compatibility here, but taking into account how long the Agate service was broken, I thought there are not a lot of users, so we could just rename the field. Good to know you are interested in the Agate service too! So, in your case you could change the configuration to something like that: (service agate-service-type (agate-configuration (content "/srv/gemini") (certificates "/srv/gemini-tls") (log-ip? #f))) 1: https://issues.guix.gnu.org/71722
Another little detail perhaps worth noting: the guix documentation specifies that if no valid key and certificate is available, then Agate will try to generate them on its own. However, if you attempt to go this route, you get an error: ``` 2024-08-16 10:58:21 No keys or certificates were found in the given directory. 2024-08-16 10:58:21 Specify the --hostname option to generate these automatically. ``` But there does not appear to be a hostname field available to agate-configuration, or at least it is not documented. Only the "hostnames" field for virtual hosts.
Christopher Howard <christopher@librehacker.com> writes: > Another little detail perhaps worth noting: the guix documentation > specifies that if no valid key and certificate is available, then > Agate will try to generate them on its own. However, if you attempt to > go this route, you get an error: > > ``` > 2024-08-16 10:58:21 No keys or certificates were found in the given directory. > 2024-08-16 10:58:21 Specify the --hostname option to generate these automatically. > ``` > > But there does not appear to be a hostname field available to agate-configuration, or at least it is not documented. Only the "hostnames" field for virtual hosts. Actually, "hostnames" field in agate-configuration is a list of hostnames that are passed as --hostname options to Agate. I am going to update documentation pointing out that certificates are going to be generated only if any hostnames are present in the "hostnames" field.
Tested v3 patch inside qemu VM. Works correctly so far. ``` user@guix ~$ gmni gemini://localhost # Hello World! ```
I was finally was able to upgrade my agate production server, using the v3 patch! Capsule pages are serving out fine. Thanks! It is great to be up-to-date again.