Skip to content

Commit d7a5ebc

Browse files
committed
add .envrc
This can be used as an example on how to integrate with direnv.
1 parent fe03b67 commit d7a5ebc

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

.envrc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env bash
2+
# ^ added for shellcheck and file-type detection
3+
4+
# Watch all of these files for change
5+
watch_dir modules
6+
watch_dir nix
7+
watch_file devshell.toml
8+
9+
# Store the shell symlink in the direnv layout directory
10+
out_link="$(direnv_layout_dir)"/devshell
11+
12+
# Build the devshell environment
13+
nix-build shell.nix --out-link "$out_link"
14+
15+
# Load the devshell
16+
# shellcheck disable=SC1090
17+
source "$out_link"

0 commit comments

Comments
 (0)