From c895de4daaaf5ed6687df5de8af5dd73993d9eab Mon Sep 17 00:00:00 2001 From: Miroslav Prasil Date: Thu, 1 May 2025 16:00:40 +0000 Subject: [PATCH] Make the example usage commands less intrusive This changes some of the examples to make the usage of direnv less intrusive for non-nix folks. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f0b9b2b..e983ed6 100644 --- a/README.md +++ b/README.md @@ -159,7 +159,7 @@ pkgs.mkShell { Then add the line `use nix` to your envrc: ```console -$ echo "use nix" >> .envrc +$ echo "if has nix; then use nix; fi" >> .envrc $ direnv allow ``` @@ -199,7 +199,7 @@ $ nix flake new -t github:nix-community/nix-direnv ### Integrating with a existing flake ```console -$ echo "use flake" >> .envrc && direnv allow +$ echo "if has nix; then use flake; fi" >> .envrc && direnv allow ``` The `use flake` line also takes an additional arbitrary flake parameter, so you