From c1c597506852d47df86261c54e77a732bded8d2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Sun, 24 Nov 2019 10:41:54 +0000 Subject: [PATCH] better nixos detection --- nixos/programs/zsh.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nixos/programs/zsh.nix b/nixos/programs/zsh.nix index 3c5d26e0..06663005 100644 --- a/nixos/programs/zsh.nix +++ b/nixos/programs/zsh.nix @@ -45,7 +45,8 @@ export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"; ''; envExtra = '' - if [[ ! -x nixos-version ]]; then + local nixos_version=`which nixos-version` + if [[ -z $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"