Emergency Exit: Allow beginners to take a break from reproducability

I have been using NixOS for about two years now and still feel like a beginner. But I am having fun enjoying the fruits of your labour. Thank you.

Over the two years, I have mostly been impressed with how reliable it is. I would find an expression someone else wrote, which would just work™. If my expression is broken, so is the other person’s. But in the rare cases when I need to run a complex application and nobody has done the hard lifting for me, I would usually not get things to work no matter what I did. This made me question my choice of OS. I think this is a common experience for NixOS beginners and would like to suggest a simple (I think) way the community can address it.

I was recently made aware of nix-ld. I think in combination with buildFHS it is possible to make a flake/shell, which one would use in case they needed an emergency brake on the reproducibility of NixOS. How does that differ from the example given in nix-ld repo? The idea is that this flake/shell would (aspire to) be universal. It would provide all libraries a binary can reasonably expect when running on a standard Linux system like Fedora or Arch.

Perhaps such a flake already exists, but the second thing that is required is clear communication that this is possible. I only realized a tool like nix-ld exists recently. Letting people know they have an out when they just can’t handle the learning curve in some particular instance should be a major selling point of this distro.

I think having an emergency exit such as the one I propose would prevent many beginners from quitting in frustration. Until recently, I believed my only option was running a VM for months or years until one day, I got lucky and one of the nix Jedis packaged it for me. I just barely pushed through and now I can see the light at the end of the tunnel.


‘Looking for libraries in FHS locations’ is only one issue, albeit a very common and significant one, with getting foreign binaries to work on NixOS. The least effort emergency exit that I’ve been recommending to beginners is distrobox, which is much more lightweight than a VM, and integrates very well with the rest of your desktop. Full graphics acceleration, access to your files without futzing with mounts, and it solves 100% of the problems associated with running a binary that expects Ubuntu (substitute any traditional distro) on something that isn’t Ubuntu—because except for the kernel, everything that binary sees will be Ubuntu, not just libraries.


I am just discovering Distrobox. It is a great solution for the emergency exit. I really wish this was one of the first things I leaned about NixOS.


Distrobox is a great tool to have. I use it whenever I run into a problem using something with Nix that I won’t be using enough to bother fixing.

I would also recommend taking a look at nix-alien. It works like nix-ld, but automatically finds the dependencies. It’s worked well for me running a couple random binaries.

I agree that it would be nice if it were a bit easier for beginners to find these tools when they face problems running software on NixOS.