add hosts default.nix

This commit is contained in:
Hendrik Sokolowski 2023-11-10 15:50:39 +01:00
parent 5c26db7444
commit a3f04973fd

30
hosts/default.nix Normal file
View file

@ -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");
};
}