envrc: use nix-direnv instead of default direnv nix support

Summary: It releases more frequently and tends to fix more bugs frequently than
direnv; it also seems to (in my experience) behave better with caching in flake
and non-flake scenarios.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
Change-Id: I39f08cd691eeac8e243c2e059edfaa9c
This commit is contained in:
Austin Seipp 2023-08-10 21:55:30 -05:00
parent 8b2801887e
commit 1abd36725a

View File

@ -1,5 +1,10 @@
# To use: echo "source_env .envrc.recommended" >> .envrc
if has nix; then
if ! has nix_direnv_version || ! nix_direnv_version 2.3.0; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.3.0/direnvrc" "sha256-Dmd+j63L84wuzgyjITIfSxSD57Tx7v51DMxVZOsiUD8="
fi
use flake
fi