From ad57c6345d328850b328ed3a79231aac990789d2 Mon Sep 17 00:00:00 2001 From: jopejoe1 Date: Sat, 13 Jan 2024 17:37:47 +0100 Subject: [PATCH] clean up systems file --- systems/default.nix | 61 ++++++++++++--------------------------------- 1 file changed, 16 insertions(+), 45 deletions(-) diff --git a/systems/default.nix b/systems/default.nix index 05e9b3e..393d8ec 100644 --- a/systems/default.nix +++ b/systems/default.nix @@ -1,49 +1,20 @@ { self, nixpkgs, inputs }: +let + mkSystem = system: name: nixpkgs.lib.nixosSystem { + inherit system; + specialArgs = inputs; + modules = [ + name + self.outputs.nixosModules.default + ]; + }; +in { - 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 ]; - }; + kami = mkSystem "x86_64-linux" ./kami; + yokai = mkSystem "aarch64-linux" ./yokai; + inugami = mkSystem "aarch64-linux" ./inugami; + tuny = mkSystem "x86_64-linux" ./tuny; + installer = mkSystem "x86_64-linux" ./installer; + steamdeck = mkSystem "x86_64-linux" ./steamdeck; }