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
source an environment when we enter a project directory, like this:
- You'll need
direnvinstalled to your current (or default) environment.
- For an environment named "projectEnv", add
. <(flox activate -e projectEnv)to your
You may need to
direnv allow depending on your setup.
Check out the direnv docs for more information.