4 ms·
> worlds better than the old ways of managing dependencies and making sure everyone on a project is aligned on what versions of things are installed. And Nix i
by pmarreck 4y ago
> worlds better than the old ways of managing dependencies and making sure everyone on a project is aligned on what versions of things are installed.
And Nix is worlds better than even this. Imagine!
- jon-wood 4y agoI’m yet to be entirely sold on that, mostly because I think Nix the language isn’t anywhere near as accessible as Dockerfiles, but I’ll be the first one cheering if Nix does manage to take over.
- archseer 4y agohttps://www.mpscholten.de/docker/2016/01/27/you-are-most-likely-misusing-docker.html https://www.mpscholten.de/docker/2016/01/27/you-are-most-lik...
- pmarreck 4y agoCompletely agree on the complexity criticism, but this interactive tutorial (that literally embeds a full nix interpreter in the browser) went a looooooong way towards making Nix files not just look like arcane incantations to me, and doesn't take very long to do: https://nixcloud.io/tour/ https://nixcloud.io/tour/ if at some point you realize "oh... this is just JSON with a different syntax, some shorthands, and anonymous or library functions," you're on the right path
- jljljl 4y agoYou might be interested in Devbox (http://jetpack.io/devbox http://jetpack.io/devbox)! We built Devbox because we were frustrated with our Docker based dev environments, and our goal is to provide the power of Nix with a more accessible interface (similar to yarn or other package managers). We're open source and rapidly adding features, you can check us out on Github at https://github.com/jetpack-io/devbox https://github.com/jetpack-io/devbox
- djbusby 4y agoHow to run Nix on Gentoo and Debian?
- pmarreck 4y agohttps://trofi.github.io/posts/196-nix-on-gentoo-howto.html https://trofi.github.io/posts/196-nix-on-gentoo-howto.html for gentoo, but https://nixos.org/download.html https://nixos.org/download.html for any linux, AFAIK
- Kinrany 4y agoDoes Nix have an equivalent of docker-compose yet? nix-shell is amazing for installing binaries, but actually wiring up and running the services doesn't seem like a solved problem. Unless Nix expects a separate tool to do this once binaries are installed, of course.
- juliosueiras 4y agohttps://github.com/hercules-ci/arion https://github.com/hercules-ci/arion which allow docker-compose
- pmarreck 4y agooooh, I did not know of this, nice!
- pmarreck 4y agodocker-compose seems necessary only because you have your "official postgres dockerfile" and your self-built "web app dockerfile" (and maybe other things like an ElasticSearch dockerfile) Docker files seem necessary only because... well put it this way, think of a Docker image as "the cached result of a build that just so happened to succeed even though it was entirely likely not to, because Docker builds are NOT deterministic." Now enter Nix, where builds are more or less guaranteed to work deterministically. You don't need to cache them into an "image" (well, the artifacts do get cached locally and online at places like https://www.cachix.org/ https://www.cachix.org/), and the only reason they can do that is because they too are deterministically guaranteed to succeed, more or less), which means you can just include any and all services you need. (Unless they need to run as separate machines/VM's... in which case I suppose you just manage 2 nix files, but yes, "composing" in that case is not really fleshed out as a thing in Nix, to my knowledge)
- poolopolopolo 4y agoexcept you cant deploy Nix files, and even if you could, better be sure that every employee is using Nix and have the same configuration. The whole point of docker is to make reproducible builds everywhere, not just your computer.