|
{
|
|
roles,
|
|
homelabConfig,
|
|
lib,
|
|
utils,
|
|
...
|
|
}:
|
|
lib.attrsets.mapAttrs' (
|
|
name: _:
|
|
let
|
|
cfg = import (./hosts + "/${name}") {
|
|
inherit roles;
|
|
hlConfig = homelabConfig;
|
|
};
|
|
hostname = cfg.hostname;
|
|
in
|
|
{
|
|
name = hostname;
|
|
value = utils.mkHost cfg;
|
|
}
|
|
) (builtins.readDir ./hosts)
|