Skip to content

Commit f991a4f

Browse files
committed
devshell: support direnv
1 parent 0157d3f commit f991a4f

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

.envrc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
if has nix; then
2+
# Are flake supported and enabled?
3+
if nix show-config | grep experimental-features | grep -q flakes; then
4+
# Do we have nix-direnv?
5+
if ! has nix_direnv_version || ! nix_direnv_version 3.0.4; then
6+
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.4/direnvrc" "sha256-gMHkKyEOq/T0XmHKgz+pN+fUQC/1EKPAuOtYM95lLnU="
7+
fi
8+
9+
use flake
10+
else
11+
use nix
12+
fi
13+
fi

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ __pycache__
55
.pytest_cache
66
.mypy_cache
77
.ruff_cache
8+
9+
.direnv

0 commit comments

Comments
 (0)