From 6b02a9c9673e8c7892ed9b56ce981f3b8b9132eb Mon Sep 17 00:00:00 2001 From: SebastianStork Date: Sat, 10 May 2025 23:41:14 +0200 Subject: [PATCH] Auto-declare hosts from hosts directory --- flake/hosts.nix | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/flake/hosts.nix b/flake/hosts.nix index 87a3774..d376195 100644 --- a/flake/hosts.nix +++ b/flake/hosts.nix @@ -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 = {