Convert to flakes parts syntax
This commit is contained in:
parent
aaa397f998
commit
0c54ab6bef
1 changed files with 11 additions and 11 deletions
22
flake.nix
22
flake.nix
|
@ -9,21 +9,22 @@
|
|||
disko.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, ... }:
|
||||
let
|
||||
allSystems = [ "x86_64-linux" "aarch64-linux" ];
|
||||
in
|
||||
{
|
||||
devShells = nixpkgs.lib.genAttrs allSystems (system:
|
||||
outputs = inputs@{ flake-parts, ... }:
|
||||
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||
systems = [
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
];
|
||||
|
||||
perSystem = { system, pkgs, ... }:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
tofuPkg = pkgs.opentofu.withPlugins (p: [
|
||||
pkgs.terraform-providers.hcloud
|
||||
pkgs.terraform-providers.null
|
||||
pkgs.terraform-providers.external
|
||||
]);
|
||||
in {
|
||||
default = pkgs.mkShell {
|
||||
devShells.default = pkgs.mkShell {
|
||||
buildInputs = [
|
||||
tofuPkg
|
||||
pkgs.terraform-ls
|
||||
|
@ -34,7 +35,6 @@
|
|||
alias tofu-apply="tofu apply -var-file=secret.tfvars"
|
||||
'';
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue