diff --git a/flake.nix b/flake.nix index 490843d..fe2966b 100644 --- a/flake.nix +++ b/flake.nix @@ -82,60 +82,15 @@ }; }; - outputs = inputs@{ self, nixpkgs, ... }: - { - nixosModules.default = import ./modules; - homeManagerModules.default = import ./home-modules; - packages = nixpkgs.lib.attrsets.genAttrs nixpkgs.lib.systems.flakeExposed (system: import ./packages { - inherit system inputs; - pkgs = nixpkgs.legacyPackages.${system}; - }); - nixosConfigurations = { - kami = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - specialArgs = inputs; - modules = [ - ./systems/kami - self.outputs.nixosModules.default - ]; - }; - yokai = nixpkgs.lib.nixosSystem { - system = "aarch64-linux"; - specialArgs = inputs; - modules = [ - ./systems/yokai - self.outputs.nixosModules.default - ]; - }; - inugami = nixpkgs.lib.nixosSystem { - system = "aarch64-linux"; - specialArgs = inputs; - modules = [ - ./systems/inugami - self.outputs.nixosModules.default - ]; - }; - tuny = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - specialArgs = inputs; - modules = [ - ./systems/tuny - self.outputs.nixosModules.default - ]; - }; - installer = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - specialArgs = inputs; - modules = [ - ./systems/installer - self.outputs.nixosModules.default - ]; - }; - steamdeck = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - specialArgs = inputs; - modules = [ ./systems/steamdeck self.outputs.nixosModules.default ]; - }; - }; + outputs = inputs@{ self, nixpkgs, ... }: { + nixosModules.default = import ./modules; + homeManagerModules.default = import ./home-modules; + nixosConfigurations = import ./systems { + inherit self inputs nixpkgs; }; + packages = nixpkgs.lib.attrsets.genAttrs nixpkgs.lib.systems.flakeExposed (system: import ./packages { + inherit system inputs; + pkgs = nixpkgs.legacyPackages.${system}; + }); + }; } diff --git a/systems/default.nix b/systems/default.nix new file mode 100644 index 0000000..05e9b3e --- /dev/null +++ b/systems/default.nix @@ -0,0 +1,49 @@ +{ self, nixpkgs, inputs }: + +{ + kami = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = inputs; + modules = [ + ./kami + self.outputs.nixosModules.default + ]; + }; + yokai = nixpkgs.lib.nixosSystem { + system = "aarch64-linux"; + specialArgs = inputs; + modules = [ + ./yokai + self.outputs.nixosModules.default + ]; + }; + inugami = nixpkgs.lib.nixosSystem { + system = "aarch64-linux"; + specialArgs = inputs; + modules = [ + ./inugami + self.outputs.nixosModules.default + ]; + }; + tuny = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = inputs; + modules = [ + ./tuny + self.outputs.nixosModules.default + ]; + }; + installer = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = inputs; + modules = [ + ./installer + self.outputs.nixosModules.default + ]; + }; + steamdeck = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = inputs; + modules = [ ./steamdeck self.outputs.nixosModules.default ]; + }; +}