feat: flakes and shells are now appeneded to the front of the zsh prompt, provided NIX_PROJECT_SHELL

This commit is contained in:
2025-11-24 01:01:51 +00:00
parent 86a5a36783
commit 50aa7ca367
+15
View File
@@ -16,6 +16,8 @@
nmap nmap
file file
freerdp freerdp
bitwarden-desktop
bitwarden-cli
]; ];
# -------------------------- # --------------------------
@@ -62,6 +64,19 @@
oh-my-zsh.enable = true; oh-my-zsh.enable = true;
oh-my-zsh.theme = "agnoster"; oh-my-zsh.theme = "agnoster";
initContent = '' initContent = ''
alias nix-shell='nix-shell --run $SHELL'
nix() {
if [[ $1 == "develop" ]]; then
shift
command nix develop -c $SHELL "$@"
else
command nix "$@"
fi
}
if [ -n "$NIX_PROJECT_SHELL" ]; then
PROMPT="($NIX_PROJECT_SHELL)$PROMPT"
fi
# Only start Zellij if we're in an interactive terminal # Only start Zellij if we're in an interactive terminal
if [ -z "$ZELLIJ" ] && [ "$TERM" != "linux" ]; then if [ -z "$ZELLIJ" ] && [ "$TERM" != "linux" ]; then
exec zellij exec zellij