README: Clarify a stance on git-tracking the direnv layout directory.

Also took the liberty to update the wording in a way that I felt read a bit more smoothly.

closes #138
This commit is contained in:
Bryan Bennett 2022-04-07 09:58:57 -04:00
parent 1741888b4c
commit d3651bdd23
No known key found for this signature in database
GPG key ID: EF90E3E98B8F5C0B

View file

@ -209,14 +209,16 @@ $ direnv allow
## Storing .direnv outside the project directory ## Storing .direnv outside the project directory
A `.direnv` directory will be created in each `use_nix` project, which might By default, every direnv-enabled directory will contain a `.direnv` directory.
interact badly with backups (e.g. Dropbox) or IDEs. `.direnv` acts as a pure cache and is fully reproducible.
To that end, we do not recommend tracking this directory or its contents,
even in the scenario that the project tracks the a `.direnvrc`.
Therefore it's possible to override a function called `direnv_layout_dir` in It is possible to override a function called `direnv_layout_dir`
`$HOME/.config/direnv/direnvrc` or in each project's `.envrc`. in `~/.config/direnv/direnvrc` (or in each project's `.direnvrc` or `.envrc`).
The following example will create a unique directory name per project The following example will create a unique directory name per project
in `$HOME/.cache/direnv/layouts/`: in `~/.cache/direnv/layouts/`:
```bash ```bash
# Place in "$HOME"/.config/direnv/direnvrc # Place in "$HOME"/.config/direnv/direnvrc