From 50aa7ca36795ed26b440e3f2c52e6fb791c3a60b Mon Sep 17 00:00:00 2001 From: 0xWheatyz Date: Mon, 24 Nov 2025 01:01:51 +0000 Subject: [PATCH] feat: flakes and shells are now appeneded to the front of the zsh prompt, provided NIX_PROJECT_SHELL --- home.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/home.nix b/home.nix index 6d0a1f2..80919ab 100644 --- a/home.nix +++ b/home.nix @@ -16,6 +16,8 @@ nmap file freerdp + bitwarden-desktop + bitwarden-cli ]; # -------------------------- @@ -62,6 +64,19 @@ oh-my-zsh.enable = true; oh-my-zsh.theme = "agnoster"; 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 if [ -z "$ZELLIJ" ] && [ "$TERM" != "linux" ]; then exec zellij