From 9ac6245a024262b3195ed37cfdf332b22fd190e8 Mon Sep 17 00:00:00 2001 From: Victor Engmark Date: Sun, 27 Sep 2026 10:44:10 +0200 Subject: [PATCH] doc/readme: Simplify nix-direnv setup Co-Authored-By: Sefa Eyeoglu --- doc/README.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/doc/README.md b/doc/README.md index 14de0dd2651b..29217dff7c9e 100644 --- a/doc/README.md +++ b/doc/README.md @@ -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