From a3f04973fd0cacd20a88f1b04b85123b781272e2 Mon Sep 17 00:00:00 2001 From: Hendrik Sokolowski Date: Fri, 10 Nov 2023 15:50:39 +0100 Subject: [PATCH] add hosts default.nix --- hosts/default.nix | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 hosts/default.nix diff --git a/hosts/default.nix b/hosts/default.nix new file mode 100644 index 00000000..5a015c4f --- /dev/null +++ b/hosts/default.nix @@ -0,0 +1,30 @@ +{ withSystem, self, inputs, ... }: + +let + mkNixosConfig = host: platform: user: { + "${host}" = self.nixos-flake.lib.mkLinuxSystem { + nixpkgs.hostPlatform = "${platform}"; + imports = [ + self.nixosModules.base + ./${host} + self.nixosModules.${user} + ]; + }; + }; +in +{ + flake = { + nixosConfigurations = {} // + (mkNixosConfig "chonk" "x86_64-linux" "iot") // + (mkNixosConfig "companion" "aarch64-linux" "iot") // + (mkNixosConfig "cox" "aarch64-linux" "iot") // + (mkNixosConfig "cube" "x86_64-linux" "iot") // + (mkNixosConfig "falcone" "aarch64-linux" "iot") // + (mkNixosConfig "giggles" "aarch64-linux" "iot") // + (mkNixosConfig "harrison" "x86_64-linux" "iot") // + (mkNixosConfig "norman" "x86_64-linux" "iot") // + (mkNixosConfig "redpanda" "x86_64-linux" "iot") // + (mkNixosConfig "ringo" "x86_64-linux" "iot") // + (mkNixosConfig "surfplace" "x86_64-linux" "iot"); + }; +}