improve documentation for use_flake

This commit is contained in:
Jörg Thalheim 2020-08-11 07:08:36 +01:00
parent f8592153f3
commit 8a397b7eb2
No known key found for this signature in database
GPG key ID: 003F2096411B5F92

View file

@ -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