dev-templates/hashi/flake.nix

35 lines
970 B
Nix
Raw Normal View History

2022-07-31 18:11:52 +02:00
{
description =
2022-07-31 18:20:01 +02:00
"A Nix-flake-based development environment for Terraform, Packer, and Nomad";
2022-07-31 18:11:52 +02:00
inputs = { dev.url = "github:the-nix-way/dev-templates"; };
outputs = { self, dev }:
let inherit (dev.lib) flake-utils nixpkgs;
in flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
2022-07-31 18:20:01 +02:00
inherit (pkgs)
damon levant mkShell nomad nomad-autoscaler nomad-pack packer
terraform;
2022-07-31 18:11:52 +02:00
2022-07-31 18:20:01 +02:00
hashiTools =
[ packer terraform nomad nomad-autoscaler nomad-pack levant damon ];
2022-07-31 18:11:52 +02:00
relatedTools = with pkgs; [ terragrunt ];
in {
devShells = {
default = mkShell {
buildInputs = hashiTools ++ relatedTools;
shellHook = ''
echo "packer `${packer}/bin/packer --version`"
${terraform}/bin/terraform --version
2022-07-31 18:20:01 +02:00
${nomad}/bin/nomad --version
2022-07-31 18:11:52 +02:00
'';
};
};
});
}