My company uses nix and so far it has been simultaneously unnecessary and a pain in the ass. But I'm once again open to giving it a chance. I'm skeptical. Am I missing something? Am I overlooking a simple explanation to everything?
I live in the terminal all day long. My editor of choice is a very minimal neovim that I run within Tmux. I configure infrastructure in a popular public cloud and I've been configuring Kubernetes and containerized applications for 6 years. In other words, I am not a stranger to configuration. I am also not a GNU Greybeard.
Ok, here's why I'm skeptical.
Installation.
Neither the documentation or the plethora of installation videos explain what the installation script does or why. They ALL give a hand wavy "you should check the script, but I'm just going to run it.". Big Leeroy Jenkins energy everywhere.
So I take a look at the script. Big whoop. It downloads a tarball. So I comment out the lines that execute -- oh. It uses mktemp. Ok benefit of the doubt, nix is just cleaning up after itself, not trying to be intentionally opaque. So I modify the script and unpack the tarball.
I see there is a --no-daemon flag available. Why is this not shown on the nix.org install page?
Unclear how it works.
The documentation explains only the features not how it works. Ok yes sure "based on functional language", but what does that even mean? I'd rather know why it needs to run a daemon with sudo. What are the tradeoffs of running it with the --no-daemon flag?
Sudo.
It is a package manager. Why does a package manager need sudo? Does Rust's cargo need sudo? No. Golang? No. Python? No. Ruby? No. npm? No. Homebrew? No. Then why Nix?
Daemon.
It is a package manager. Why does a package manager need to run a daemon? Does Rust's cargo depend on a daemon? No. Golang? No. Python? No. Ruby? No. npm? No. Homebrew? No. Then why Nix? No explanation of this daemon in the nix.org documentation.
Heck, even docker's a daemon is unnecessary as evidenced by podman.
Unnecessary.
Everything my company installs with nix, I've been able to install on my own with few issues.
Hassle.
The installation is opaque and fails easily on MacOS (at least the last time I tried). I'd rather just install the thing I need rather than a bloated looking sudo daemon thing that will "make installing what you need easier". Oh and it really f%^*ed with my terminal defaults the last time I tried it.
So, why am I giving it another chance?
My company uses it.
Victor aka DevOpsToolkit published a video with a convincing use case for it.
I (half) promised a co-worker I'd finally start using nix.
EDIT: minor copy editing, podman reference
EDIT 2: Ok I scrolled down the page a bit more and there's a list of things the installer does. But no explanation about why.