From 29768461851e2acfc00f856212fb53f1f4e2d38b Mon Sep 17 00:00:00 2001 From: Miran Bastaja Date: Sat, 7 Sep 2024 17:48:11 +0200 Subject: [PATCH 1/2] Update templates .envrc files Update templates .envrc files to use watch_file instead of the deprecated nix_direnv_watch_file. --- templates/flake-parts/.envrc | 4 ++-- templates/terraform/.envrc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/templates/flake-parts/.envrc b/templates/flake-parts/.envrc index 70ce5295f..8106bf9be 100644 --- a/templates/flake-parts/.envrc +++ b/templates/flake-parts/.envrc @@ -2,8 +2,8 @@ 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=" 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/terraform/.envrc b/templates/terraform/.envrc index ac18306bf..c42085518 100644 --- a/templates/terraform/.envrc +++ b/templates/terraform/.envrc @@ -2,8 +2,8 @@ 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=" 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 From cd02a133fde88e82d74d88205671d9147bbc06b6 Mon Sep 17 00:00:00 2001 From: Miran Bastaja Date: Sat, 7 Sep 2024 20:40:32 +0200 Subject: [PATCH 2/2] Bump direnvrc extension version in template envrcs --- templates/flake-parts/.envrc | 4 ++-- templates/simple/.envrc | 4 ++-- templates/terraform/.envrc | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/templates/flake-parts/.envrc b/templates/flake-parts/.envrc index 8106bf9be..b236cc267 100644 --- a/templates/flake-parts/.envrc +++ b/templates/flake-parts/.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/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 c42085518..0fa73a598 100644 --- a/templates/terraform/.envrc +++ b/templates/terraform/.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