Auto-declare hosts from hosts directory

This commit is contained in:
SebastianStork 2025-05-10 23:41:14 +02:00
parent 9b2bf9686e
commit 6b02a9c967

View file

@ -33,12 +33,11 @@ let
in
{
flake = {
nixosConfigurations = lib.mkMerge [
(mkHost "alto")
(mkHost "cirrus")
(mkHost "fern")
(mkHost "north")
];
nixosConfigurations =
"${self}/hosts"
|> builtins.readDir
|> lib.filterAttrs (_: type: type == "directory")
|> lib.concatMapAttrs (name: _: mkHost name);
deploy.nodes = {
alto = {