From 4d578493d937c0b49bfd7f1c29a903e642732ab3 Mon Sep 17 00:00:00 2001 From: IogaMaster <67164465+IogaMaster@users.noreply.github.com> Date: Mon, 2 Oct 2023 11:29:01 -0600 Subject: [PATCH] Make direnv more compatible (#54) ## Description of changes Direnv now checks if you have nix installed before trying to load the env. It also checks if you are using nushell and will use the toolkit ## Relevant Issues - should supersede #50 --- .envrc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.envrc b/.envrc index 3550a30..664e752 100644 --- a/.envrc +++ b/.envrc @@ -1 +1,11 @@ -use flake +# If nix is installed hook into it. +if [ $(which nix) ] +then + use flake +fi + +# If nu is the current shell use toolkit.nu +if [ $(echo $SHELL) == $(which nu) ] +then + nu -e "use toolkit.nu" +fi