From 21f182919510cdce11a50152e36dbd1228ddd616 Mon Sep 17 00:00:00 2001 From: Marco Date: Tue, 21 Sep 2021 10:25:15 +0200 Subject: [PATCH] add nix-chroot to prompt --- zsh/.zshrc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/zsh/.zshrc b/zsh/.zshrc index f16909d..351cab0 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -71,7 +71,13 @@ else TOOLBOX="" fi -PROMPT="${TOOLBOX}(%M) %~ %{$fg[red]%}%(#~#~$)%{$reset_color%} " +if [[ "$NIX_PATH" && "$NIX_PROFILES" && "$NIX_CONF_DIR" ]]; then + NIX_CHROOT="%F{4}❄%f " +else + NIX_CHROOT="" +fi + +PROMPT="${NIX_CHROOT}${TOOLBOX}(%M) %~ %{$fg[red]%}%(#~#~$)%{$reset_color%} " RPROMPT="\$vcs_info_msg_0_" precmd () {