From 0898c67a5a0c7b007a98b68ce220a67bffa14a35 Mon Sep 17 00:00:00 2001 From: caem Date: Thu, 25 Jul 2024 21:32:55 +0200 Subject: [PATCH] Simplify mkHosts --- lib/hosts.nix | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/lib/hosts.nix b/lib/hosts.nix index 9251458..f94a590 100644 --- a/lib/hosts.nix +++ b/lib/hosts.nix @@ -5,20 +5,12 @@ modules, nixpkgs, inputs, - path ? (builtins.toString ../hosts), - }: let - hosts = lib.getDirsInDir path; - common = { - system = "x86_64-linux"; - modules = modules; - }; - in - builtins.listToAttrs (builtins.map (host: { + }: builtins.listToAttrs (builtins.map (host: { name = host; value = nixpkgs.lib.nixosSystem { - system = common.system; - modules = common.modules ++ [ ../hosts/${host} ]; + system = "x86_64-linux"; + modules = modules ++ [ ../hosts/${host} ]; specialArgs = { inherit inputs; }; }; - }) hosts); + }) (lib.getDirsInDir ../hosts)); }