Skip to content

Allow .envrc to integrate into existing direnv environments#3025

Open
hickey wants to merge 1 commit into
meshcore-dev:devfrom
hickey:fix/direnv-coexistence
Open

Allow .envrc to integrate into existing direnv environments#3025
hickey wants to merge 1 commit into
meshcore-dev:devfrom
hickey:fix/direnv-coexistence

Conversation

@hickey

@hickey hickey commented Jul 22, 2026

Copy link
Copy Markdown

The existing .envrc sets up the Nix environment which is nice, but not all of us use Nix.

This change will make setting up the Nix environment conditional upon finding nix-shell. This way if the direnv is being executed outside of the Nix environment direnv will not fail.

In addition, the source_up stdlib call is used to process all parent .envrc files.

Signed-off-by: Gerard Hickey <hickey@kinetic-compute.com>
@hickey

hickey commented Jul 22, 2026

Copy link
Copy Markdown
Author

Given the comments in #2699, I wonder if it would be beneficial to add source_env_if_exists .env-local to the .envrc to allow a developer to add any personal customization without having it get pushed back into the repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant