Enable Nix

This commit is contained in:
Loic Nageleisen 2020-12-21 18:20:09 +01:00
parent d0e09a7149
commit 8930c9e228
3 changed files with 10 additions and 0 deletions

View file

@ -92,6 +92,9 @@ prompt_build_simple() {
[[ -n "$action" ]] && echo -n "$action" [[ -n "$action" ]] && echo -n "$action"
fi fi
set_color -p yellow
[[ -n "${IN_NIX_SHELL}" ]] && echo -n " nix"
# close prompt # close prompt
set_color -p none set_color -p none
echo -n '> ' echo -n '> '

5
shell/nix Executable file
View file

@ -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

View file

@ -168,6 +168,8 @@ set_prompt() {
[[ -n "$action" ]] && buffer="${buffer} %F{yellow}$action" [[ -n "$action" ]] && buffer="${buffer} %F{yellow}$action"
fi fi
[[ -n "${IN_NIX_SHELL}" ]] && buffer="${buffer} %F{yellow}nix"
buffer="${buffer}%f> " buffer="${buffer}%f> "
PROMPT="${buffer}" PROMPT="${buffer}"
} }