top | item 41945100

(no title)

pierrebeucher | 1 year ago

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.

Both are great in my opinion.

discuss

order

sshine|1 year ago

So what are the gotchas?

ilyagr|1 year ago

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.

- There seems to be no way to run `direnv` on an environment that's not the current working dir, see https://github.com/cachix/devenv/issues/67.

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.