Add Hashi stack
This commit is contained in:
parent
713899016d
commit
918d4551b7
4 changed files with 102 additions and 0 deletions
1
hashi/.envrc
Normal file
1
hashi/.envrc
Normal file
|
@ -0,0 +1 @@
|
|||
use flake .
|
60
hashi/flake.lock
generated
Normal file
60
hashi/flake.lock
generated
Normal file
|
@ -0,0 +1,60 @@
|
|||
{
|
||||
"nodes": {
|
||||
"dev": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1659281217,
|
||||
"narHash": "sha256-ohsPHmt1vhiXSl8tcC80RaRFgXWNufGjSOINFxhD47Q=",
|
||||
"owner": "the-nix-way",
|
||||
"repo": "dev-templates",
|
||||
"rev": "213f22722019f37dbee67d5c602a0452675639da",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "the-nix-way",
|
||||
"repo": "dev-templates",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"locked": {
|
||||
"lastModified": 1656928814,
|
||||
"narHash": "sha256-RIFfgBuKz6Hp89yRr7+NR5tzIAbn52h8vT6vXkYjZoM=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "7e2a3b3dfd9af950a856d66b0a7d01e3c18aa249",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1659280101,
|
||||
"narHash": "sha256-LRmrGFQTM724ZAI339ZJ380x6uKG5FwMic142tY7Efk=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "424a3ec89d09109bbf87d7a61ba3a7f679c05dc2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"dev": "dev"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
30
hashi/flake.nix
Normal file
30
hashi/flake.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
description =
|
||||
"A Nix-flake-based development environment for Terraform and Packer";
|
||||
|
||||
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; };
|
||||
|
||||
inherit (pkgs) mkShell packer terraform;
|
||||
|
||||
hashiTools = [ packer terraform ];
|
||||
|
||||
relatedTools = with pkgs; [ terragrunt ];
|
||||
in {
|
||||
devShells = {
|
||||
default = mkShell {
|
||||
buildInputs = hashiTools ++ relatedTools;
|
||||
|
||||
shellHook = ''
|
||||
echo "packer `${packer}/bin/packer --version`"
|
||||
${terraform}/bin/terraform --version
|
||||
'';
|
||||
};
|
||||
};
|
||||
});
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue