Why My Love-Hate Relationship with Nix Continues

Lost in the Weeds

Nix may sound like Unix, but it offers a unique set of tools designed for package and environment management, with consistency and reproducibility at its core.

If you’re looking for more than a surface-level intro to Nix, besides rants on YCombinator, Alexander Bantyev did a really good job at explaining it in layman’s terms.

What Does This Mean

In practice, the power of being able to recreate an environment within seconds anywhere Nix runs is immense.

These environments are all isolated and reproducible, which ensures conflict-free portability through a single source of truth—a simple configuration file that tells Nix how something is built. Here’s a vague example showing Nix in practice:

{
  description = "A simple script that sums two numbers";
  inputs.utils.url = "github:numtide/flake-utils";

  outputs =
    {
      self,
      nixpkgs,
      utils,
    }:
    utils.lib.eachDefaultSystem (
      system:
      let
        pkgs = import nixpkgs { inherit system; };
        name = "sum";
      in
      rec {
        defaultPackage = packages.sum;
        packages.sum = pkgs.writeShellScriptBin name ''
          	echo $(($1 + $2))
        '';
      }
    );
}

Sounds Sweet

What’s the catch? It sounds too good to be true—and it isn’t; if you don’t count complexity and lack of adoption.

Nix is fundamentally different from mainline distros due to how it is engineered, such as the lack of FHS compliance and the necessity of doing everything declaratively, making things tricky.

Note that doing things imperatively isn’t impossible; it’s just heavily frowned upon as it goes against the whole point of Nix and is incredibly error-prone.


The language can often be confusing or, worse, produce “impossible” to debug errors, like the infamous infinite recursion encountered.

Getting something that isn’t already packaged working can be a nightmare.

Dealing with functional programming purists can be challenging; but at least, there is no war in Ba Sing Se.

Quid ergo?

A Latin phrase meaning “So what?”


Nothing, really. I just wanted to share my experience.
Overall, I’m enamoured with it but also repulsed; it is a sort of paradoxical toxic relationship.

Despite the pain it can bring, I truly believe that Nix is a glimpse into the future of package management—and I hope it becomes more accessible to accelerate that future.