Why Nix
Long Ago…
I started using Docker at a time when I had to be ready to explain what it is and why I was using it. I loved the idea that I could package a very complex application or a service give it to any Linux user and it only took a few kilobytes worth of text. It was awesome. Then we got Docker Compose, which was even awesomer (my sic).
Docker Problems
Years later, shortly after creating a build pipeline in Azure, I was feeling good… One morning, just before standups, a member on my team sends me a message on Slack: “our pipeline won’t build.”
Something that has been working like a clock, failed without being modified. My base Linux image was there, but one of the packages simply disappeared (for the version I wanted).
This is not a bug in Docker, this is fine, but I didn’t care. I wanted something that was more predictable, and completely reproducible.
The Journey… and Some Pain
I started searching, and asked myself, why can’t I have something like Terraform but for linux. I wanted a tool to configure the complete system that was going to run my services.
I remember a friend of mine was running something called Nix. I looked at it, and told myself: “not for me… too confusing.” But it was a new day, and I decided to take a closer look. As soon as I started I quickly realized this was going to take a lot of effort.
Took me six months to get comf… I mean less painful… Countless of times I was cursing under my breath about the confusing error messages. Searching for a solution was difficult because the state of Nix documentation needs to be improved.
The Essential Tool
Today my workflow includes Nix everywhere. Develpment environments, build pipelines, runtime system configuration, and my home-lab are all Nix. It took a lot of work to get here, right now it is an essential tool in my toolkit.
Managing multiple machines and system became easy. Nuanced configurations of complex software simply turned into a system agnostic nix module, and writing a package is straight forward (once you get there). Just like I learned AWS after learning using Terraform, I have now gained nuanced understanding of how Linux itself works.