Writing a Guix service from scratch, as a beginner
This article serves as a guide for beginners to create a custom service for the Caddy reverse proxy in Guix. The author, who is migrating from NixOS to Guix, has already set up a mail server using exim and is now working on migrating their VPS to Guix. They found that exim is the only MTA available in the official Guix channel and decided to explore custom services to better understand and utilize the Guix system.
For the proxy server, the author prefers using Caddy but it's not available as a service on Guix. This motivated the author to write this article as a step-by-step guide for newcomers to create their own service. The article focuses on building a simple and bare-bones service that does the job without being elegant or ready for distribution.
To accomplish this, the author defines a service type as a blueprint for the service, similar to a class in object-oriented programming. They mention that the service type requires a name and a list of extensions, with optional fields such as compose, extend, default-value, description, and location. The article then proceeds to create the simplest service possible, which does nothing, in order to familiarize itself with the concept of Guix services.
Written by urgent.news from Lobsters's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.