The existing .envrc makes the assumption that Nix is being used and breaks a user's direnv setup. To fix this problem and make a working environment for everyone the current .envrc needs to check if Nix is installed before attempting to execute any Nix specific code. If not found, it should exit gracefully without errors.
In addition, the .envrc needs to source any parent '.envrc' so that the rest of the user's environment is not broken. It is customary to setup tool env variables at the parent directory of all the development projects instead of specifying all the same env vars in every project. The current .envrc does not allow this and this can be fixed by adding the source_up directive.
The existing
.envrcmakes the assumption that Nix is being used and breaks a user'sdirenvsetup. To fix this problem and make a working environment for everyone the current.envrcneeds to check if Nix is installed before attempting to execute any Nix specific code. If not found, it should exit gracefully without errors.In addition, the
.envrcneeds to source any parent '.envrc' so that the rest of the user's environment is not broken. It is customary to setup tool env variables at the parent directory of all the development projects instead of specifying all the same env vars in every project. The current.envrcdoes not allow this and this can be fixed by adding thesource_updirective.