From f50323e2f275da3456bc48adcb551811294298ac Mon Sep 17 00:00:00 2001 From: seth Date: Mon, 17 Apr 2023 18:58:34 -0400 Subject: further improve lib --- lib/host.nix | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'lib/host.nix') diff --git a/lib/host.nix b/lib/host.nix index 767124c..5b092b4 100644 --- a/lib/host.nix +++ b/lib/host.nix @@ -1,4 +1,4 @@ -{mapFilterDirs}: rec { +{lib}: rec { mkHost = { name, modules, @@ -34,14 +34,11 @@ mapHosts = inputs: let hosts = import ../hosts inputs; + inherit (lib.my) mapFilterDirs; in mapFilterDirs ../hosts (n: v: v == "directory" && n != "turret") (name: _: - mkHost { - inherit name inputs; - inherit (hosts.${name}) modules system stateVersion pkgs; - specialArgs = - if builtins.hasAttr "specialArgs" hosts.${name} - then hosts.${name}.specialArgs - else {}; - }); + mkHost ({ + inherit name inputs; + } + // hosts.${name})); } -- cgit v1.2.3