about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--kittybox-rs/.envrc9
1 files changed, 6 insertions, 3 deletions
diff --git a/kittybox-rs/.envrc b/kittybox-rs/.envrc
index 46c7b6d..47925b7 100644
--- a/kittybox-rs/.envrc
+++ b/kittybox-rs/.envrc
@@ -1,4 +1,7 @@
-if which nix &>/dev/null; then
-  source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/1.2.4/direnvrc" "sha256-mjD0RK61W+TEffhlEzjv2QB3l/d5FkXQVPd4S5DfCsA="
-  use flake
+if has nix; then
+    if ! has nix_direnv_version || ! nix_direnv_version 2.1.1; then
+        source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.1.1/direnvrc" \
+            "sha256-b6qJ4r34rbE23yWjMqbmu3ia2z4b2wIlZUksBke/ol0="
+    fi
+    use flake ..
 fi