Wouldn't have said better, devenv and Flox are indeed similar and both uses Nix packages. We can say they are different frontends to the same set of packages, with slightly different features.
I've just tried both `devenv` and `flox`, and the latter had two related niceties:
- Direnv wants to put its config inside the root of a git repo, which makes it hard to ignore. Flox's config is all in a `.flox` directory, so I could `echo * >> .flox/.gitignore` in any repo without changing the repo's gitignore.
OTOH, `flox` was a bit harder to install in an existing nix setup and requires trusting their cache, at least if I wanted to do a cached install. You can follow the instructions in https://flox.dev/docs/install-flox/#__tabbed_1_6, or you could add yourself to Nix's "trusted users" (which makes sense only if you're the only user on the computer using Nix). See also https://github.com/flox/flox/issues/1179.
I’ve used Nix for 6 months, and it beats Devcontainers at a higher cost, but with less IDE lock-in.
Devenv, as far as I understand, is a convenience layer on top of Nix. Just as Flox is.