mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-22 18:59:07 +01:00
24 lines
551 B
Nix
24 lines
551 B
Nix
{
|
|
inputs,
|
|
self,
|
|
lib,
|
|
...
|
|
}:
|
|
let
|
|
mkHost =
|
|
hostName:
|
|
inputs.nixpkgs.lib.nixosSystem {
|
|
specialArgs = { inherit inputs self; };
|
|
modules = [
|
|
{ networking = { inherit hostName; }; }
|
|
"${self}/hosts/common.nix"
|
|
"${self}/hosts/${hostName}"
|
|
"${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;
|
|
}
|