Nix Is Fighting The Last War

Feb 18, 2023

Nix solves the problem of hermetic Linux environments. Your tools and configuration are deterministically sealed and packaged – always giving the same result. This was a real issue in the time of golden image machines when Linux distributions were hand-crafted to perfection.

But that was the last war. Just as Nix matures and celebrates its second decade of development, the nature of the problem that Nix is trying to solve is changing.

Development environments are becoming even more ephemeral and moving to the cloud. On the other hand, production environments are sealed with Docker – it might not be the best solution, but it's the path-dependent one.

For development environments, the shift to remote IDEs will change many things. GitHub CodeSpaces is a sleeper success, and developers will switch to VSCode in the browser when it gets good enough (it's getting close). Nix (nixpkgs) might seem poised to solve these issues – package management in an ephemeral cloud environment (that's what Replit does). But a cloud-based IDE means more tricks at your disposal. I believe that implementing the same tools that developers are used to in a cloud-native way will be more fruitful (see StackBlitz's turbo package manager, which lets users use yarn and npm like normal). Or maybe that means something like the idea for GitHub's missing package manager.

For production environments, Docker is the prevailing package manager. It might not be as declarative as Nix, but it can be made declarative enough for most organizations, and the tooling and debugging story is much more straightforward.

It's hard for Nix to fit into today's ecosystem – and I assume it will only get more complex. Of course, you can change and adapt the ideas from Nix and nixpkgs until they start to look more modern, but at that point, will it look different enough to no longer be Nix?