Nix : Better compat with flakes.

This commit is contained in:
Dmitry Voronin 2024-02-08 06:48:33 +03:00
parent d86c1841af
commit 5d7b2b5ea4

View file

@ -43,7 +43,11 @@ function nix_shell() {
local target="${1}" local target="${1}"
[[ "${target}" = "" ]] && target="default" [[ "${target}" = "" ]] && target="default"
NIX_SHELL="${target}" nix develop ".#${target}" if [[ "${target}" = "default" ]]; then
NIX_SHELL="${target}" nix develop
else
NIX_SHELL="${target}" nix develop ".#${target}"
fi
} }
alias shell="nix_shell" alias shell="nix_shell"