Skip to content

Commit

Permalink
feat(flake): add Dev Container configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
lajp committed Jan 6, 2025
1 parent 25eaa74 commit 1d0ffa1
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
14 changes: 14 additions & 0 deletions .devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"customizations": {
"vscode": {
"extensions": [
"mkhl.direnv",
"4ops.terraform",
"ms-azuretools.vscode-azureterraform"
]
}
},
"image": "ghcr.io/cachix/devenv:latest",
"overrideCommand": false,
"updateContentCommand": ""
}
23 changes: 22 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@
devShells =
forEachSystem
(system: let
pkgs = nixpkgs.legacyPackages.${system};
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
in {
default = devenv.lib.mkShell {
inherit inputs pkgs;
Expand All @@ -37,6 +40,24 @@
# 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;
name = "Terraform fmt check";
entry = "terraform fmt --recursive";
pass_filenames = false;
};
}
];
};
Expand Down

0 comments on commit 1d0ffa1

Please sign in to comment.