add terraform dev env
add readme
This commit is contained in:
commit
3fc1d51752
4 changed files with 60 additions and 0 deletions
10
README.md
Normal file
10
README.md
Normal file
|
@ -0,0 +1,10 @@
|
|||
# nix-dev-envs
|
||||
|
||||
Generic Nix development environment I use for my projects.
|
||||
|
||||
## Usage
|
||||
|
||||
Put to following in
|
||||
```
|
||||
use flake "git:https://git.kun.is/pim/nix-dev-envs.git/<ENV>"
|
||||
```
|
1
terraform/.envrc
Normal file
1
terraform/.envrc
Normal file
|
@ -0,0 +1 @@
|
|||
use flake
|
27
terraform/flake.lock
Normal file
27
terraform/flake.lock
Normal file
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1697793076,
|
||||
"narHash": "sha256-02e7sCuqLtkyRgrZmdOyvAcQTQdcXj+vpyp9bca6cY4=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "038b2922be3fc096e1d456f93f7d0f4090628729",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
22
terraform/flake.nix
Normal file
22
terraform/flake.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
description = "A Nix-flake-based Terraform environment";
|
||||
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
|
||||
outputs = { self, nixpkgs }:
|
||||
let
|
||||
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
|
||||
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
});
|
||||
in
|
||||
{
|
||||
devShells = forEachSupportedSystem ({ pkgs }: {
|
||||
default = pkgs.mkShell {
|
||||
packages = with pkgs; [
|
||||
terraform
|
||||
];
|
||||
};
|
||||
});
|
||||
};
|
||||
}
|
Reference in a new issue