doc/readme: Simplify nix-direnv setup

Co-Authored-By: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
Victor Engmark
2026-09-27 10:44:10 +02:00
parent a2ffba684f
commit 9ac6245a02

View File

@@ -51,14 +51,16 @@ $ cd /path/to/nixpkgs/doc
$ nix-shell
```
To load the development utilities automatically when entering that directory, [set up `nix-direnv`](https://nix.dev/guides/recipes/direnv).
To load the documentation development environment automatically when entering that directory:
Make sure that your local files aren't added to Git history by adding the following lines to `.git/info/exclude` at the root of the Nixpkgs repository:
1. Install [`nix-direnv`](https://search.nixos.org/packages?channel=unstable&query=nix-direnv#show=nix-direnv)
1. Set up direnv in the documentation directory:
```
/**/.envrc
/**/.direnv
```
```ShellSession
$ cd doc
$ echo "use nix" > .envrc
$ direnv allow
```
#### Live preview