mirror of
https://github.com/nix-community/nix-direnv.git
synced 2025-11-08 19:46:11 +01:00
improve documentation for use_flake
This commit is contained in:
parent
f8592153f3
commit
8a397b7eb2
1 changed files with 9 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue