CI/CD on Sourcehut with Nix

Using Source Hut Pages with a Nix image (flake). The .build.yml file in the root folder is specific to Sourcehut Pages. Please update the sources section to match your repo name and update site to your site’s URL. To host using Sourcehut Pages the name of the site has to be YOUR-USER-NAME.srht.site unless you use a custom domain.

August 25, 2024 · 1 min

Automated local builds with Podman

The same infrastructure with Nix can be used to build the site locally using Podman to run a Nix container and use a single command to trigger a reproducible build. This requires local installation of Podman and pulling the guix container before running ./container/nix-container.sh. Now the build sequence is a little longer but it is modular: ./container/nix-container.sh → ./container/nix-develop.sh → build.sh → build.el → MD → hugo → HTML. Note: currently the Nix image doesn’t cache the derivations for the added packages from flake....

August 26, 2024 · 1 min