I have been using Arch Linux for several years, and I have been curious about NixOS for a while.
I really like the idea of having a declarative, reproducible system that is easy to rebuild. I have tried NixOS a few times and I understand the advantages, at least in theory. Still, I cannot fully convince myself to use it as my main system.
My biggest concern is compiling, developing, and generally working with third-party software.
From what I understand, on NixOS you cannot always download a precompiled Linux binary and run it directly. NixOS does not use the usual filesystem layout, so the binary may not find the linker or the libraries in the paths it expects.
I know there are tools such as nix-shell, nix develop, buildFHSUserEnv, nix-ld, and other ways to create compatible environments. The problem is that you do not always know in advance which dependencies are required.
Imagine a real situation. I urgently need a program for work. The package is not available in nixpkgs, there is no flake, and there is no existing .nix file. The project is only available on GitHub and I need to compile it from source.
On Arch, I would usually clone the repository, install the dependencies listed in the README, and try to build it. If something is missing, I install the required package and continue. It is not always the cleanest approach, but it is usually fast and practical.
How do you handle this kind of situation on NixOS when you do not have time to write a proper derivation immediately?
Is there a practical way to quickly enter an environment similar to a traditional Linux distribution, install the required dependencies, and compile the project? Can you start with a quick temporary setup and only create a proper Nix expression later?
I am also interested in the case of precompiled binaries. If I download a program and I do not know all the required libraries, what is the fastest way to identify what is missing and make it run?
I have heard that similar issues were one of the reasons Tsoding stopped using NixOS. I do not know how accurate that claim is, but the concern makes sense to me. NixOS seems excellent when everything is already packaged, but it may become more difficult when you need to modify, compile, or quickly test unknown software.
For people who use NixOS for daily development, reverse engineering, C or C++ projects, experimental software, and unpackaged GitHub repositories, how do you handle these cases?
Are there tools or workflows that make this almost as quick as on Arch?
I am not trying to criticize NixOS. I am trying to understand whether this is a real limitation, whether it depends on my workflow, or whether I am simply missing some important tools.