Skip to content

Commit f4a78c9

Browse files
authored
docs: Update direnv docs for Nix and remove .envrc (#3790)
1 parent 567e750 commit f4a78c9

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

.envrc

-1
This file was deleted.

docs/CONTRIBUTING.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,15 @@ copying path '/nix/store/v2gvj8whv241nj4lzha3flq8pnllcmvv-ignore-5.2.0.tgz' from
1717
...
1818
```
1919

20-
If [direnv](https://direnv.net/) is installed and the [hooks are configured](https://direnv.net/docs/hook.html) then the development environment can be _automatically instantiated_ thus removing the need to run `nix-shell` by hand!
20+
If [direnv](https://direnv.net/) is installed and the [hooks are configured](https://direnv.net/docs/hook.html) then the development environment can be _automatically instantiated_ by creating the following `.envrc`, thus removing the need to run `nix-shell` by hand!
21+
22+
```
23+
$ cd ~/code/coder
24+
$ echo "use nix" >.envrc
25+
$ direnv allow
26+
```
27+
28+
Now, whenever you enter the project folder, `direnv` will prepare the environment for you:
2129

2230
```
2331
$ cd ~/code/coder

0 commit comments

Comments
 (0)