diff --git a/templates/flake-parts/.envrc b/templates/flake-parts/.envrc index 70ce5295f..b236cc267 100644 --- a/templates/flake-parts/.envrc +++ b/templates/flake-parts/.envrc @@ -1,9 +1,9 @@ -if ! has nix_direnv_version || ! nix_direnv_version 2.2.1; then - source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.1/direnvrc" "sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs=" +if ! has nix_direnv_version || ! nix_direnv_version 2.5.0; then + source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.5.0/direnvrc" "sha256-5XwUul/GUzj52MC5LvjHaZXDW2iLnl93tEQSYm9f3Rc=" fi -nix_direnv_watch_file flake.nix -nix_direnv_watch_file flake.lock +watch_file flake.nix +watch_file flake.lock DEVENV_ROOT_FILE="$(mktemp)" printf %s "$PWD" > "$DEVENV_ROOT_FILE" diff --git a/templates/simple/.envrc b/templates/simple/.envrc index c42085518..0fa73a598 100644 --- a/templates/simple/.envrc +++ b/templates/simple/.envrc @@ -1,5 +1,5 @@ -if ! has nix_direnv_version || ! nix_direnv_version 2.2.1; then - source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.1/direnvrc" "sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs=" +if ! has nix_direnv_version || ! nix_direnv_version 2.5.0; then + source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.5.0/direnvrc" "sha256-5XwUul/GUzj52MC5LvjHaZXDW2iLnl93tEQSYm9f3Rc=" fi watch_file flake.nix diff --git a/templates/terraform/.envrc b/templates/terraform/.envrc index ac18306bf..0fa73a598 100644 --- a/templates/terraform/.envrc +++ b/templates/terraform/.envrc @@ -1,9 +1,9 @@ -if ! has nix_direnv_version || ! nix_direnv_version 2.2.1; then - source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.1/direnvrc" "sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs=" +if ! has nix_direnv_version || ! nix_direnv_version 2.5.0; then + source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.5.0/direnvrc" "sha256-5XwUul/GUzj52MC5LvjHaZXDW2iLnl93tEQSYm9f3Rc=" fi -nix_direnv_watch_file flake.nix -nix_direnv_watch_file flake.lock +watch_file flake.nix +watch_file flake.lock if ! use flake . --impure then echo "devenv could not be built. The devenv environment was not loaded. Make the necessary changes to devenv.nix and hit enter to try again." >&2