qenya: zsh: automatically run nix-shell when necessary

Closes #9
This commit is contained in:
Katherina Walshe-Grey 2024-09-12 13:55:15 +01:00
parent 4a9e6b5f3c
commit 752fce2538

View file

@ -25,6 +25,15 @@
theme = "agnoster"; theme = "agnoster";
}; };
initExtra = ''
# If a shell is started in a directory with a shell.nix, automatically run nix-shell
if [ -f ./shell.nix ]; then
if [ -z "$IN_NIX_SHELL" ]; then
nix-shell --command "zsh"
fi
fi
'';
envExtra = '' envExtra = ''
DEFAULT_USER=qenya DEFAULT_USER=qenya
''; '';