1
0
Fork 0
mirror of https://github.com/hercules-ci/flake-parts.git synced 2025-03-05 16:36:56 +00:00

docs: add troubleshooting to shell-environemnts

This commit is contained in:
Santiago Fraire 2023-06-24 08:22:56 +02:00
parent 02b1bdb2fe
commit 8fd103c90b

View file

@ -6,7 +6,7 @@
This example shows how to create a shell environment which This example shows how to create a shell environment which
includes a diverse set of tools: includes a diverse set of tools:
``` ```sh
terraform terraform
wget wget
bat bat
@ -29,3 +29,24 @@ You can have as many shells as you want, in this [flake.nix](./flake.nix), you a
```sh ```sh
nix develop .#another_env nix develop .#another_env
``` ```
## Troubleshooting
### My shell has changed
There 2 possible solutions:
First, using [direnv](https://direnv.net/) to manage your dev environments. See [direnv-guide](https://haskell.flake.page/direnv). This is the recommended approach.
Second is a simple-unreliable hack, which is adding a `shellHook` to `devShells`
```nix
devShells.default = pkgs.mkShell {
shellHook = ''
exec $SHELL
'';
};
```
You might get a lot different issues, use it at your own risk.