feat: Add flox for local development#811
feat: Add flox for local development#811apenney wants to merge 1 commit intoopenstreetmap:masterfrom
Conversation
Flox (flox.dev) is a nix based tool for building local developer environments. This work adds a flox env that sets up ruby (via rbenv) as well as podman. This means you don't need any local dependencies installed other than nix/flox, and your environment is completely isolated to this repository. I've tested this primarily on linux, ensuring that a clean flox env can come up and run `rbenv exec bundle exec cookstyle` as well as a kitchen test.
|
The problem with adding things like this, which you'll probably be the only user of ever, is that they just bitrot over time because nobody maintains them and they're not being tested at all. |
|
I was going to propose an option around that, but I thought it might be premature... I've been using flox in CI for other projects, so that it's constantly exercised. It would be slower with rbenv as it's going to compile instead of pulling a binary, but I actually put in a ton of extra work to make it use rbenv rather than just using an existing ruby binary from nix (so it wouldn't be hard to flip back if that was a better option). I'm also happy to keep this as a local thing only, but I figured it's primarily just a few files in .flox so the maintenance load is pretty low even if it does decay. |
|
When you say it's "nix based" what does that mean exactly? That it only works if you're using nix as your os? |
|
It doesn't need nixos, it just uses nix. So if you can install nix itself in your distro, you can install flox on top. On macos it comes bundled, so you can just They have a container (ghcr.io/flox/flox) and rpm/deb packages too, so it's relatively easy to install across almost everything. Edit: You didn't ask, but another nice feature is |
[I created this because I use flox for everything else and I like having isolated environments when working on stuff. It's a great tool, based on nix, and is open source so hopefully this is acceptable!]
Flox (flox.dev) is a nix based tool for building local developer environments. This work adds a flox env that sets up ruby (via rbenv) as well as podman. This means you don't need any local dependencies installed other than nix/flox, and your environment is completely isolated to this repository.
I've tested this primarily on linux, ensuring that a clean flox env can come up and run
rbenv exec bundle exec cookstyleas well as a kitchen test.