Better Image Building
I’ve managed to recently upgrade my image building process for this website, using some of what I have been learning about Nix. For a while while I was first learning to use Nix I thoguht of the language, the packages, and the OS as being one thing. And this did a disservice to both the breadth of what Nix offers as well as the capabilities it offers.
Old Paradigm
So previously with this site I used a fairly straightforward and manual
process. I installed Hugo on my local machine with
dnf, ran the dev server, and
edited my pages. When I pushed the commits into GitHub, I had a
Containerfile
in the repository that would get built with Docker or
Podman, pushing the resulting image to my image
repository. I used a
multi-stage file, first pulling the Hugo image to build the files and
then grabbing the resulting build produts to place them into the
Nginx image.