chore(nix): commit direnv .envrc to auto-load the flake devshell#3
Merged
Conversation
Commit a minimal .envrc containing 'use flake' so that contributors who use direnv get the devshell loaded automatically on cd into the repo, with no extra setup beyond 'direnv allow'. The generated .direnv/ cache stays gitignored.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a minimal
.envrccontaininguse flaketo the repository, so that direnv automatically loads the Nix devshell when youcdinto the project.The generated
.direnv/cache stays gitignored (as it already is) — only the tiny, declarative.envrcis tracked.Why
Floresta's development workflow already allows Nix: building and testing pull dependencies from the flake's devshell (e.g.
libbitcoinkernel-sys). The repo ships aflake.nixand already gitignores.direnv/, which only makes sense if a direnv-based workflow is expected. The one file that actually wires that up (.envrc) was simply never tracked.Committing
.envrccloses that gap.On the alternative (gitignoring
.envrc)There is a school of thought that
.envrcis personal/local config and should be gitignored (the direnv project itself does this). That's a reasonable stance for projects where direnv is incidental. I'm okay with this approach as well if mantainers think its best