Skip to content

Commit

Permalink
fix: enter direnv faster on clean git
Browse files Browse the repository at this point in the history
  • Loading branch information
nrdxp committed Aug 8, 2024
1 parent 0f2c7bf commit 2a40504
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .envrc
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
eval "$(nix print-dev-env -f shell.nix)"
watch_file shell.nix src/dev

if git diff-index --quiet HEAD shell.nix src/dev && [[ -h .direnv/shell ]]; then
. <(nix print-dev-env ".direnv/shell" 2>/dev/null)
else
drv="$(nix-instantiate shell.nix --add-root .direnv/shell)"
. <(nix print-dev-env "$drv" 2>/dev/null)
fi

0 comments on commit 2a40504

Please sign in to comment.