This is a quick tip which seems to be working well.
If you work on a project which always needs some tools present in a specific environment you can use direnv to automatically load the right environment:
- install
direnv
in your default profile (so that it’s available whenever you open a shell session) - create a
.envrc
file containing. <(flox activate -e work)
wherework
is the environment you need - allow that file to be used with
direnv allow
Then every time you cd into your work directory the work
environment will be active.