diff --git a/flake.nix b/flake.nix index f450f5e..ef12ac9 100644 --- a/flake.nix +++ b/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" ''; }; - } - ); - }; + }; + }; }