Enhance .envrc for improved Nix environment management fallback

This commit is contained in:
HendrikRauh 2026-02-08 17:04:46 +01:00
parent 8f18e328e0
commit 9a30d3dff5

5
.envrc
View file

@ -1,4 +1,9 @@
# When nix is available, use the flake for environment management # When nix is available, use the flake for environment management
if command -v nix &> /dev/null; then if command -v nix &> /dev/null; then
if type use_flake &> /dev/null; then
use flake use flake
else
echo "Falling back to nix develop (nix-direnv not available)"
eval "$(nix develop --print-env 2>/dev/null || echo 'echo Failed to load nix environment')"
fi
fi fi