diff --git a/.devcontainer.json b/.devcontainer.json index 77a7a76..8bdb84a 100644 --- a/.devcontainer.json +++ b/.devcontainer.json @@ -3,12 +3,12 @@ "vscode": { "extensions": [ "mkhl.direnv", - "4ops.terraform", + "hashicorp.terraform", "ms-azuretools.vscode-azureterraform" ] } }, "image": "ghcr.io/cachix/devenv:latest", "overrideCommand": false, - "updateContentCommand": "" + "updateContentCommand": ["direnv","reload"] } diff --git a/.envrc b/.envrc index dc25ec7..f63cb7a 100644 --- a/.envrc +++ b/.envrc @@ -4,7 +4,7 @@ fi watch_file flake.nix watch_file flake.lock -if ! use flake . --no-pure-eval +if ! use flake . --no-pure-eval --accept-flake-config 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 fi diff --git a/.gitignore b/.gitignore index d04f728..4b467da 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ terraform.exe .idea/ .devenv .direnv +.pre-commit-config.yaml diff --git a/flake.nix b/flake.nix index b2307bc..fe58ca3 100644 --- a/flake.nix +++ b/flake.nix @@ -40,17 +40,6 @@ # https://devenv.sh/reference/options/ packages = [pkgs.azure-cli]; languages.terraform.enable = true; - devcontainer = { - enable = true; - settings = { - updateContentCommand = ""; - customizations.vscode.extensions = [ - "mkhl.direnv" - "4ops.terraform" - "ms-azuretools.vscode-azureterraform" - ]; - }; - }; git-hooks.hooks.terraform-fmt = { enable = true;