config/hosts.nix

21 lines
297 B
Nix
Raw Normal View History

2024-12-26 17:22:00 +01:00
{
roles,
homelabConfig,
lib,
2024-12-26 17:22:00 +01:00
...
}:
lib.attrsets.mapAttrs' (
name: _:
let
cfg = import (./hosts + "/${name}") {
inherit roles;
hlConfig = homelabConfig;
2024-12-26 19:20:22 +01:00
};
hostname = cfg.hostname;
in
{
name = hostname;
value = cfg;
}
) (builtins.readDir ./hosts)