Activating environments with direnv¶
A handy setup for environments is to activate them with direnv
in a given
project directory. When you enter into a directory, direnv
will load the
configuration present in your .envrc
file. Therefore, we can tell direnv
to
source an environment when we enter a project directory, like this:
- You'll need
direnv
installed to your current (or default) environment. - Add
eval "$( flox print-dev-env; )";
to your.envrc
file.
You may need to direnv allow
depending on your setup.
Check out the direnv docs for more information.