From 632c6e5ad76ada2e8e829673eeb6fef864c91375 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Sun, 24 Nov 2019 10:45:04 +0000 Subject: [PATCH] check both path and executability --- nixos/programs/zsh.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/programs/zsh.nix b/nixos/programs/zsh.nix index 06663005..c2bd0a41 100644 --- a/nixos/programs/zsh.nix +++ b/nixos/programs/zsh.nix @@ -46,7 +46,7 @@ ''; envExtra = '' 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 export NIX_PATH="$HOME/.nix-defexpr/channels:$NIX_PATH" echo "non-nixos patches loaded"