check both path and executability

This commit is contained in:
Cyryl Płotnicki 2019-11-24 10:45:04 +00:00
parent c1c5975068
commit 632c6e5ad7

View file

@ -46,7 +46,7 @@
''; '';
envExtra = '' envExtra = ''
local nixos_version=`which nixos-version` local nixos_version=`which nixos-version`
if [[ -z $nixos_version ]]; then if [[ ! -x "$nixos_version" ]]; then
source /home/cyryl/.nix-profile/etc/profile.d/nix.sh source /home/cyryl/.nix-profile/etc/profile.d/nix.sh
export NIX_PATH="$HOME/.nix-defexpr/channels:$NIX_PATH" export NIX_PATH="$HOME/.nix-defexpr/channels:$NIX_PATH"
echo "non-nixos patches loaded" echo "non-nixos patches loaded"