cashmere

cashmere

nix ecosystem when to use it

I see the Nix ecosystem as a long-term investment, similar to developing applications and web servers in Rust.

Especially in web development, Rust and Go are often compared in terms of how fast you can ship your product and iterate on it.

In most cases, Golang is the better choice. But if you’ve committed yourself to Rust’s zero-cost abstractions and the borrow checker, which will tell you in most cases how to fix your problems, you will very likely never go back.

The same goes for me, at least with the Nix ecosystem. The first time setting up a somewhat usable NixOS server, even on Hetzner, took me maybe around 6 hours. It was more than a commitment. In the end, I found out that a semi-abandoned repo called nixos-infect still worked, and the whole installation took a few minutes. I stuck to it until recently, when I committed myself to nixos-anywhere, which is even more insane if you dig into it.

I do run two Ubuntu VPSs on Hetzner, fully deployed with Docker. I may have upgraded them too much, but in the end they cost me 30 EUR per month. Besides them, I have one NixOS server running on ARM for 7.50 EUR, where I deploy various services for fun, and another one on interserver.net for 6 bucks with a 2 TB drive, which I use for backups. When I compare the efficiency and cost, it’s now a no-brainer for me to use Nix. But it was a real commitment.

In the end, it really depends on a person’s circumstances if and when to utilize Nix.

Since I started using Nix almost 3 years ago, I’ve seen support for Nix pop out of everywhere. It baffles a lot of newcomers, myself included. When I have the time, I actually love digging into certain topics, services, and packages. But there are also a lot of times when I realize it’s not the right time for Nix.

Tags: #nixos #programming #rust