Skip to content

chore(nix): commit direnv .envrc to auto-load the flake devshell#3

Merged
lorenzolfm merged 1 commit into
masterfrom
envrc
May 30, 2026
Merged

chore(nix): commit direnv .envrc to auto-load the flake devshell#3
lorenzolfm merged 1 commit into
masterfrom
envrc

Conversation

@lorenzolfm

@lorenzolfm lorenzolfm commented May 27, 2026

Copy link
Copy Markdown
Owner

What

Adds a minimal .envrc containing use flake to the repository, so that direnv automatically loads the Nix devshell when you cd into the project.

$ cat .envrc
use flake

The generated .direnv/ cache stays gitignored (as it already is) — only the tiny, declarative .envrc is 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 a flake.nix and 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 .envrc closes that gap.

On the alternative (gitignoring .envrc)

There is a school of thought that .envrc is 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

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.
@lorenzolfm
lorenzolfm merged commit ceab4b2 into master May 30, 2026
17 of 21 checks passed
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