4 ms·
Nix is the closest I've come to this dream. I like docker, but it's too resource heavy on a Mac. I need it running directly and not in a VM. So a simple nix f
by silviogutierrez 7y ago
Nix is the closest I've come to this dream.
I like docker, but it's too resource heavy on a Mac. I need it running directly and not in a VM.
So a simple nix file, and nix-shell shebangs[1] has been life changing. Throw in --pure and now you really know the environment works everywhere.
My repos all have a shell.nix with every dependency. Just call nix-shell and it works in Linux and OSX. Anywhere.
You can even bundle it into a docker image and use nix in there too. For production, etc.
Documentation and tutorials are lacking, but if you put in some time, I've found nothing comparable.
Version it in, pin the Nix channel[2], and you can come back a year later in a brand new machine and start where you left off.
[1] https://gist.github.com/travisbhartwell/f972aab227306edfcfea https://gist.github.com/travisbhartwell/f972aab227306edfcfea
[2] Highly counterintuitive: if you don't pin a Nix channel, it's a moving target and dependencies may go missing, be updated, etc.
- thundergolfer 7y agoAgree that Nix is a great candidate. The PhD about it is quite readable and demonstrates the rigour with which the author approaches this problem space. It’s pretty difficult to understand and use though.
- whateveracct 7y agoNix has pretty awful UX for sure. It's kind of a trial by fire to learn it. But once you do, you can build abstractions to improve that UX. But it would be nice if vanilla Nix was easier.
- zelly 7y agoNix was a huge innovation in operating systems. The wider community has not caught up yet, but it will.