diff --git a/bash/prompt b/bash/prompt index d4a8c40..388f7d1 100644 --- a/bash/prompt +++ b/bash/prompt @@ -92,6 +92,9 @@ prompt_build_simple() { [[ -n "$action" ]] && echo -n "$action" fi + set_color -p yellow + [[ -n "${IN_NIX_SHELL}" ]] && echo -n " nix" + # close prompt set_color -p none echo -n '> ' diff --git a/shell/nix b/shell/nix new file mode 100755 index 0000000..0f921c6 --- /dev/null +++ b/shell/nix @@ -0,0 +1,5 @@ +if [ -e /Users/lloeki/.nix-profile/etc/profile.d/nix.sh ]; then . /Users/lloeki/.nix-profile/etc/profile.d/nix.sh; fi + +#if [[ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]]; then +# . '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' +#fi diff --git a/zsh/prompt b/zsh/prompt index e39eaaa..22af2be 100644 --- a/zsh/prompt +++ b/zsh/prompt @@ -168,6 +168,8 @@ set_prompt() { [[ -n "$action" ]] && buffer="${buffer} %F{yellow}$action" fi + [[ -n "${IN_NIX_SHELL}" ]] && buffer="${buffer} %F{yellow}nix" + buffer="${buffer}%f> " PROMPT="${buffer}" }