From 8a397b7eb2c83333cae262e4a3da41446debca7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 11 Aug 2020 07:08:36 +0100 Subject: [PATCH] improve documentation for use_flake --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index b16437a..9722ab3 100644 --- a/README.md +++ b/README.md @@ -129,6 +129,8 @@ nix-direnv also comes with a flake alternative. The code is tested and works how since future nix versions might change their api regarding this feature we cannot guarantee stability after an nix upgrade. +Save this file as `flake.nix`: + ``` nix { description = "A very basic flake"; @@ -145,6 +147,13 @@ guarantee stability after an nix upgrade. } ``` +Then add `use flake` to your `.envrc`: + +```console +$ echo "use flake" >> .envrc +$ direnv allow +``` + ## Storing .direnv outside the project directory A `.direnv` directory will be created in each `use_nix` project, which might