From b72274b052ae06cbe60a97d623829b1458369cc2 Mon Sep 17 00:00:00 2001 From: Kevin Amado Date: Sat, 29 Jan 2022 19:52:53 -0500 Subject: [PATCH] refactor: allow nix3 alias --- .envrc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.envrc b/.envrc index 4fb998c..de76301 100644 --- a/.envrc +++ b/.envrc @@ -7,5 +7,10 @@ watch_file flake.lock { # shell gc root dir mkdir -p "$(direnv_layout_dir)" - eval "$(nix print-dev-env --no-update-lock-file --no-write-lock-file --profile $(direnv_layout_dir)/flake-profile)" + if test -n "$(command -v nix3)"; then + nix=nix3 + else + nix=nix + fi + eval "$($nix print-dev-env --no-update-lock-file --no-write-lock-file --profile $(direnv_layout_dir)/flake-profile)" }