Convert to flakes parts syntax
This commit is contained in:
parent
aaa397f998
commit
0c54ab6bef
1 changed files with 11 additions and 11 deletions
20
flake.nix
20
flake.nix
|
@ -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"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
};
|
||||||
);
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue