Use nix-direnv instead of lorri

This commit is contained in:
Charlotte Van Petegem 2020-07-07 15:37:15 +02:00
parent 789ffd218b
commit 32ba100ee4
2 changed files with 16 additions and 7 deletions

View file

@ -4,10 +4,8 @@
* Create a new `*.nix` file in the shells directory that describes the environment (this is the hard part).
* Execute `lorri init` in the base directory of your project. This will create a `.envrc` file and `shell.nix` file.
* Execute `use_nix > .envrc` to initialize the `.envrc` file.
* Edit the `shell.nix` file so that it contains `import /path/to/this/repo/shells/your-new-file.nix`.
* Execute `ln -s /path/to/correct/file.nix shell.nix`.
* For shells that have a shellHook that exports environment containing computed directories (e.g. the git root or the current working directory), add `eval "$shellHook"` to your `.envrc`.
* Execute `direnv allow` to load the `.envrc` file which in turn uses `lorri` to load your `shell.nix` file.
* Execute `direnv allow` to load the `.envrc` file which in turn loads your environment.