Nix : Rename nix_shell var to resolve possible name collision.

This commit is contained in:
Dmitry Voronin 2024-02-03 04:09:14 +03:00
parent 51eb7a6092
commit 2cfd342176
2 changed files with 4 additions and 4 deletions

View file

@ -82,7 +82,7 @@ function nix_shell() {
local name="${1,,}" local name="${1,,}"
[[ "${name}" = "" ]] && name="main" [[ "${name}" = "" ]] && name="main"
nix_shell="${name}" nix-shell ~/.config/linux/shell/"${name^}".nix NIX_SHELL="${name}" nix-shell ~/.config/linux/shell/"${name^}".nix
} }
alias shell="nix_shell" alias shell="nix_shell"
@ -102,7 +102,7 @@ function nix_tmpshell() {
pkgs+=("nixpkgs#${pkg}") pkgs+=("nixpkgs#${pkg}")
done done
nix_shell="${1}" nix shell ${pkgs[@]} NIX_SHELL="${1}" nix shell ${pkgs[@]}
} }
alias tmpshell="nix_tmpshell" alias tmpshell="nix_tmpshell"

View file

@ -73,8 +73,8 @@ function __prompt_command() {
PS1+="\[${color_default}\]" PS1+="\[${color_default}\]"
# Show nix shell name. # Show nix shell name.
if [ -n "${nix_shell}" ]; then if [ -n "${NIX_SHELL}" ]; then
PS1+="${color_white}${nix_shell}${color_default} " PS1+="${color_white}${NIX_SHELL}${color_default} "
fi fi
# Show remote connections. # Show remote connections.