4 ms·
My experience with Nix was a real pleasure, and a complete failure. I set out with the goal of building a development environment for a software I was working
by rhn_mk1 9y ago
My experience with Nix was a real pleasure, and a complete failure.
I set out with the goal of building a development environment for a software I was working on. I thought - Nix sounds like a better Docker, where it's possible to choose package versions independently of the rest of the system. It's perfect for testing!
I found the package description language refreshing - it was powerful without getting too complicated. Over the course of a couple of days I was able to adapt a few packages and create my own too, with the build environment.
It was almost finished, but the last problem remained: installing CUDA and the userspace portion of the Nvidia driver. It's not rocket science – I thought – all I need is a few .so's, it even works with Docker.
Alas, after battling Nix for another couple of days, trying to use generic GL, installing the Nvidia one, ignoring it altogether or trying to using the host version - I gave up. I found no way to build a package linked against OpenGL that would actually work.
Despite that, I hope to use Nix with a different project in the future.
- nh2 9y agoHere are some links that might help you to get OpenGL work with nix programs on non-NixOS machines: * https://github.com/NixOS/nixpkgs/issues/9415#issuecomment-309249312 https://github.com/NixOS/nixpkgs/issues/9415#issuecomment-30... * https://github.com/guibou/nixGL https://github.com/guibou/nixGL * https://github.com/deepfire/nix-install-vendor-gl https://github.com/deepfire/nix-install-vendor-gl
- ris 9y agoAlthough other people have different opinions to me, I don't really see Nix as something for the desktop, but for development, deployment and server software it's a killer solution for me.
- Filligree 9y agoNone of what he mentioned was desktop-specific. GPUs are useful, and if CUDA is involved then it's being used for acceleration of some kind, which can perfectly well be done on servers. I agree that Nix is hard to deal with when it comes to binary distributions of any kind, which includes CUDA.
- tome 9y ago> I agree that Nix is hard to deal with when it comes to binary distributions of any kind, which includes CUDA. That's really interesting to me. Why is a binary package not considered a source package where "compiling" it is a no-op?
- Filligree 9y agoIt's a problem of altering the embedded paths to point at the nix store. There are some tools for doing that -- patchelf, etc. -- but it's far more difficult to get all that right than to compile from source. A source package using autoconf will, in general, just work. A binary package always needs extra work.
- mbrock 9y agoExtremely happy user of NixOS on my laptop (Dell XPS) for 2.5 years chiming in to say that being able to share parameterized configuration modules between your laptop and your servers is ridiculously nice for a developer and admin!
- alexozer 9y agoGah! My story is pretty much exactly the same.
- ARussell 9y agoThis is very similar to my experience, as well. I tried Nix for over a year. It has excellent ideas and principles. In practice, though, I ran into so many bugs that were near impossible for me to figure out on my own. I personally didn't find the community all that helpful, either. YMMV.
- pknopf 9y agoI have used NixOS. It's fustrations led me to develop this. https://github.com/pauldotknopf/darch https://github.com/pauldotknopf/darch It is essentially Docker, but you can boot bare-metal with it. It even uses Docker under the hood. Every boot is a fresh boot. You can read-write during boot, but all changes are made to ram. You mount with fstab things you want persisted, like home. It uses very simply primitives, which makes it easy to use. Squashfs/grub-mkconfig/overlayfs/etc. Docker isn't exactly a "primitive", but it is easily reasoned with.
- danharaj 9y agoHm, I'm using CUDA in production via Nix. When did you attempt this? It may be much easier now than it was before. If there's some particular technicality you need solved- like requiring a specific driver version- I can help.
- shub 9y agoI had a similar experience, although in my case the stumbling block was virtualenv. It needed to zip some .py files installed by nix and that totally failed because nix sets mtime to 0 on files it manages. I get why that's a thing they do but zip only allows file times after 1980 or so. NixOS is a really, really interesting project that I will be very interested in using once it's ready for prime time.