Hacker News new | ask | show | jobs
by striking 1185 days ago
I ship a development environment to a fleet of ~100 engineer laptops based on Nix. If it didn't work, I'd be out of a job
1 comments

Why would engineers need their environment shipped to them by a human?
Technically they `git pull` it themselves, but the fact that it continues to work involves a human.
Do they run NixOS or just use the package manager? What’s the host OS?
They run macOS, pull a repo, run a setup script.

They get a multi-user Nix install with a direnv integration that boots up project-local daemons. Think Postgres, Redis, and so on; those are all available, along with the Nix packages the env needs, while their current working directory is that of a project folder.

Very few things live outside of the project, but the things that do are unfortunately stateful. We'll be solving that soon, too.

Is the direnv integration custom or do you base it off of something? I use direnv extensively but I don't have it start any project daemons currently and I've been shipping scripts via devShell for managing them. I'd be very interested in this
We use nix-direnv mostly for the caching support and we use s6 as basically an init system but per project. Besides that it's all custom. We're looking to replace s6 with our own supervisor soon.

Edited to add, direnv just gets installed via `nix-env` but I wish it were using nix-darwin.

I'll probably get to write a blog post about this in a couple months.