by troad · 3y ago · 0 comments
The first issue you describe is that you already have alternative Nix-like solutions in particular domains (R packages), and Nix let you continue using them. Is this not desirable though? You have the choice of letting Nix handle this, or carving out a Nix-less niche to continue using existing / more cross-compatible solutions.
The second issue is that support for games is weak in NixOS. But is this surprising? You're running games via emulation on a niche OS, where neither the game or the emulation tools you're using officially support NixOS. I'd say the fact NixOS can run these games at all is very impressive. Other alt-OSes, like Haiku, would not be able to do so.
The third issue is that you seem to need to edit /etc/hosts to be able to connect to captive portals on public WiFi. Do you? I'm on Linux, and I don't.
It honestly seems like Nix requires more tinkering than you were willing to do to get it set up, and that's an absolutely valid decision to make - it's the reason I don't use Arch, for example - but I feel like your article frames this as an issue with Nix, which seems a little disingenuous.
Developer environments are my favorite usage of nix. To me, they deliver on the promise but, there’s a big caveat, dealing with languages that need native libraries is a real pain. The mentioned buildFHSUserEnv is basically a last resort. There are better solutions but they require a great deal more fiddling. I find that my start up time for getting a developer environment going is very long, sometimes 10x longer than just installing it in Ubuntu on a fresh vm. I find it is worthwhile to go through this process as I then don’t have to worry about being able to recreate it or switch between very incompatible projects. Luckily for me, the ecosystem that I frequently have to deal with this with is python and poetry2nix works pretty well (with some rough edges). mach-nix made this even easier but it is abandoned in favor of dream2nix which isn’t ready.
The learning curve for nix is intense. It is incredibly unfamiliar and useful information is widely spread (the main documentation was too dense for me to comprehend when I started). Read the post, it seems to me that the author never got over the learning hump into it actually being useful. I think that is a perfectly rational choice, it isn’t the right thing for everyone. The one thing that kept me going through the first year of the learning process was one of the things that the author didn’t find important, being able to boot to a previous configuration. I don’t have to worry about updates that break something or making a bad configuration change. If I update my system and something breaks, at worst, I can simply reboot to revert to the previous configuration until I’m ready to troubleshoot the issue.
Nix also does itself a disservice but not promoting flakes as the nix way. Using channels makes reproducibility much worse.
https://github.com/btobolaski/mood-tracker
Very basic Django app. Poetry2Nix basically worked out of the box without fiddling. Can drop into a dev shell with `nix develop`. It also demonstrates building a container for the application with exactly the same dependencies using `nix build`
https://github.com/btobolaski/text-generation-webui/tree/nix...
The opposite end of the spectrum, this adds a nix dev environment for text-generation-webui with cuda support. It is much more complex and mixes wheels with python libraries from nixpkgs. Torch comes from nixpkgs which means that it needs to build from source which takes a while. I’m currently attempting to get it working with just wheels but I’m having some trouble getting all of the native library paths fixed. This demonstrates nix’s flexibility as it pulls two separate copies of nixpkgs in order to match cuda and the nvidia drivers to what my hardware is currently running with.
1. This is a bit off, Nix does not exactly let me continue using existing tools. NixOS' dependency system means that the R dependency management system I was using (renv) would not work on its own. renv would try to compile R libraries but would fail because it could not find dependencies
I accept that Nix provides a way to handle this problem through buildFHSUserEnv, but the point I raised in the post was that buildFHSUserEnv feels hacky and unparadigmatic. I conceded, through additional NixOS configuration, that I couldn't use NixOS' store or use the NixOS recommended way of installing R libraries
2. Yep, not surprising at all, definitely to be expected. The point I wanted to make in the post was that NixOS makes it harder to tell whether it is a Linux or game-specific issue or if it is because of NixOS
Also, even though it wasn't surprising in the least, it was still a major annoyance/frustration
3. Not all captive portals, most just used a 302 HTTP redirect which works without trouble, but some were weirder -- although I'm beginning to think that this was because I didn't have `networking.useDHCP = true` enabled, as I wrote in another comment