26 lines
534 B
Nix
26 lines
534 B
Nix
{ lib }:
|
|
|
|
{
|
|
mkHosts = {
|
|
nixpkgs,
|
|
inputs,
|
|
modules,
|
|
user,
|
|
flakeRoot,
|
|
}: builtins.listToAttrs (builtins.map (host: {
|
|
name = host;
|
|
value = nixpkgs.lib.nixosSystem {
|
|
system = "x86_64-linux";
|
|
modules = modules ++ [
|
|
../hosts/${host}
|
|
../modules/nixos/user/${user}.nix
|
|
];
|
|
specialArgs = {
|
|
inherit inputs;
|
|
inherit lib;
|
|
username = user;
|
|
rootDir = flakeRoot;
|
|
};
|
|
};
|
|
}) (lib.getDirsInDir ../hosts));
|
|
}
|