From 8930c9e2282ae24d33053634321dc2b848f88e95 Mon Sep 17 00:00:00 2001 From: Loic Nageleisen Date: Mon, 21 Dec 2020 18:20:09 +0100 Subject: [PATCH] Enable Nix --- bash/prompt | 3 +++ shell/nix | 5 +++++ zsh/prompt | 2 ++ 3 files changed, 10 insertions(+) create mode 100755 shell/nix 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}" }