💾 Archived View for rwv.io › 2024-01-30-dezhemini-guix.gmi captured on 2024-03-21 at 14:43:32. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2024-02-05)

🚧 View Differences

-=-=-=-=-=-=-

Running dezhemini on guix

Guix is a very powerful distribution and makes it easy to distribute your own off-main channels (additional package and service repositories). A couple of months ago Ludovic Courtès wrote an article on the guix blog about publishing your source development repository as a channel and it got me to move my capsule to a guix server.

guix blog: From development environments to continuous integration

It is now possible to do this from the dezhemini master branch.

What is dezhemini aka dʒɛmɪni?

To add the dezhemini channel to a guix server add the following channel (see .config/guix/channels.scm):

(channel
 (name 'dezhemini)
 (url "https://git.sr.ht/~rwv/dezhemini")
 (branch "master"))

And run guix pull.

Now add the following service definition to the services section in your system config.scm file:

(service dezhemini-service-type
         (dezhemini-configuration
          (directory "/srv/gemini")
          (cert-pem-files '("example.cert.pem"))
          (key-pem-files '("example.com.key.pem"))
          (server-specs '("example.com:root")))))

In the above example dezhemini will serve files from "/srv/gemini/root" directory with SSL certificate and key from the "/srv/gemini" directory. The certificate files can be generated with:

cd /srv/gemini
guix shell dezhemini -- dezhmnsrv example.com:root

Run guix system reconfigure and dezhemini should be started automatically by shepherd.

For more configuration options, look for the define-configuration section in the following:

.guix/modules/dezhemini.scm

Note by default the dezhemini package depends on the full racket package which is pretty big but does include everything and the kitchen sink. For a more lightweight setup configure the service to use dezhemini-minimal.

Also note that no environment variables are set, so if you want to run CGI scripts, make sure to add something like:

(environment-variables '("PATH=/run/current-system/profile/bin"))

to the service configuration.

Enjoy!

Cheers,

R.

--

📅 2024-01-30

🏷 dezhemini, floss, guix, racket

📧 hello@rwv.io

CC BY-NC-SA 4.0