-
Notifications
You must be signed in to change notification settings - Fork 4
/
flake.nix
37 lines (35 loc) · 1.09 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{
inputs = {
nixpkgs-terraform.url = "github:stackbuilders/nixpkgs-terraform";
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
systems.url = "github:nix-systems/default";
terranix.url = "github:terranix/terranix";
};
nixConfig = {
extra-substituters = "https://nixpkgs-terraform.cachix.org";
extra-trusted-public-keys = "nixpkgs-terraform.cachix.org-1:8Sit092rIdAVENA3ZVeH9hzSiqI/jng6JiCrQ1Dmusw=";
};
outputs = { self, nixpkgs-terraform, nixpkgs, systems, terranix }:
let
forEachSystem = nixpkgs.lib.genAttrs (import systems);
in
{
packages = forEachSystem (system: {
default = terranix.lib.terranixConfiguration {
inherit system;
modules = [ ./config.nix ];
};
});
devShells = forEachSystem
(system:
let
pkgs = nixpkgs.legacyPackages.${system};
terraform = nixpkgs-terraform.packages.${system}."1.9";
in
{
default = pkgs.mkShell {
buildInputs = [ terraform pkgs.terranix ];
};
});
};
}