Hacker News new | ask | show | jobs
by donnacodes 2181 days ago
*extreme nerd voice: "just use Nix"
2 comments

The Nix package manager solves the 'single docker container to be my build environment' thing well. nix-shell is significantly nicer to use than docker.

How is it for the docker-compose 'I need x, y, z running' use case? It's not something I need that much, there are various shell.nix hacks I've seen to (e.g.) get Postgres running for Elixir development. They work, but it's not as rich an approach as the rest of Nix.

totally that's a fair question. I've only been using it by building x, y, z separately and it does reduce my build times significantly. I also just love to be able to fetch binaries with absolutely no strings attached. But in terms of orchestration Docker has far easier interface with compose etc. As far as I know, Nix doesn't really have this sort of solution built in but I guess you could write a derivation where you orchestrate different binaries yourself, starting them with some sort of task manager. So far I just build the binaries with Nix and orchestrate them myself on the server
There must be some stuff, because NixOS exists. Whether it can work in a more standalone way I don't know.
Yeah, the thing is that most of us don’t have the patience of figuring out how Nix works , write derivations and stuff.

Docker and Compose look pretty straightforward in comparison, at least for local development.

Nix may not be straightforward to learn, but Docker isn't straightforward to use. Container orchestration is a pain to deal with, for instance.