1
0
Fork 0

Convert to flakes parts syntax

This commit is contained in:
Ethan Reece 2025-02-21 02:30:52 -06:00
parent aaa397f998
commit 0c54ab6bef
Signed by: me
GPG key ID: 198E9EB433DB1B28

View file

@ -9,21 +9,22 @@
disko.inputs.nixpkgs.follows = "nixpkgs"; disko.inputs.nixpkgs.follows = "nixpkgs";
}; };
outputs = { self, nixpkgs, ... }: outputs = inputs@{ flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [
"x86_64-linux"
"aarch64-linux"
];
perSystem = { system, pkgs, ... }:
let let
allSystems = [ "x86_64-linux" "aarch64-linux" ];
in
{
devShells = nixpkgs.lib.genAttrs allSystems (system:
let
pkgs = import nixpkgs { inherit system; };
tofuPkg = pkgs.opentofu.withPlugins (p: [ tofuPkg = pkgs.opentofu.withPlugins (p: [
pkgs.terraform-providers.hcloud pkgs.terraform-providers.hcloud
pkgs.terraform-providers.null pkgs.terraform-providers.null
pkgs.terraform-providers.external pkgs.terraform-providers.external
]); ]);
in { in {
default = pkgs.mkShell { devShells.default = pkgs.mkShell {
buildInputs = [ buildInputs = [
tofuPkg tofuPkg
pkgs.terraform-ls pkgs.terraform-ls
@ -34,7 +35,6 @@
alias tofu-apply="tofu apply -var-file=secret.tfvars" alias tofu-apply="tofu apply -var-file=secret.tfvars"
''; '';
}; };
} };
);
}; };
} }