2022-07-31 09:11:52 -07:00
|
|
|
{
|
|
|
|
description =
|
2022-07-31 09:20:01 -07:00
|
|
|
"A Nix-flake-based development environment for Terraform, Packer, and Nomad";
|
2022-07-31 09:11:52 -07: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 09:20:01 -07:00
|
|
|
inherit (pkgs)
|
|
|
|
damon levant mkShell nomad nomad-autoscaler nomad-pack packer
|
2022-08-13 08:32:28 -07:00
|
|
|
terraform vault;
|
2022-07-31 09:11:52 -07:00
|
|
|
|
2022-08-13 08:32:28 -07:00
|
|
|
hashiTools = [
|
|
|
|
packer
|
|
|
|
terraform
|
|
|
|
nomad
|
|
|
|
vault
|
|
|
|
nomad-autoscaler
|
|
|
|
nomad-pack
|
|
|
|
levant
|
|
|
|
damon
|
|
|
|
];
|
2022-07-31 09:11:52 -07: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 09:20:01 -07:00
|
|
|
${nomad}/bin/nomad --version
|
2022-08-13 08:32:28 -07:00
|
|
|
${vault}/bin/vault --version
|
2022-07-31 09:11:52 -07:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
});
|
|
|
|
}
|