From 1abd36725a47ca1b25b815b684fab2eb1b71fc0d Mon Sep 17 00:00:00 2001 From: Austin Seipp Date: Thu, 10 Aug 2023 21:55:30 -0500 Subject: [PATCH] envrc: use nix-direnv instead of default direnv nix support Summary: It releases more frequently and tends to fix more bugs frequently than direnv; it also seems to (in my experience) behave better with caching in flake and non-flake scenarios. Signed-off-by: Austin Seipp Change-Id: I39f08cd691eeac8e243c2e059edfaa9c --- .envrc.recommended | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.envrc.recommended b/.envrc.recommended index bc17be32a..40ba7f241 100644 --- a/.envrc.recommended +++ b/.envrc.recommended @@ -1,5 +1,10 @@ # To use: echo "source_env .envrc.recommended" >> .envrc if has nix; then + + if ! has nix_direnv_version || ! nix_direnv_version 2.3.0; then + source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.3.0/direnvrc" "sha256-Dmd+j63L84wuzgyjITIfSxSD57Tx7v51DMxVZOsiUD8=" + fi + use flake fi