mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-22 20:09:07 +01:00
25 lines
623 B
Nix
25 lines
623 B
Nix
{
|
|
inputs,
|
|
self,
|
|
lib,
|
|
...
|
|
}:
|
|
let
|
|
mkHost =
|
|
hostName:
|
|
inputs.nixpkgs.lib.nixosSystem {
|
|
specialArgs = { inherit inputs self; };
|
|
modules = [
|
|
{ networking = { inherit hostName; }; }
|
|
"${self}/hosts/${hostName}/default.nix"
|
|
"${self}/hosts/${hostName}/hardware.nix"
|
|
"${self}/hosts/${hostName}/disko.nix"
|
|
"${self}/users/seb"
|
|
]
|
|
++ lib.optional (lib.pathExists "${self}/users/seb/@${hostName}") "${self}/users/seb/@${hostName}";
|
|
};
|
|
in
|
|
{
|
|
flake.nixosConfigurations =
|
|
"${self}/hosts" |> self.lib.listDirectoryNames |> self.lib.genAttrs mkHost;
|
|
}
|