diff --git a/flake/default.nix b/flake/default.nix index 5e64d90..7127139 100644 --- a/flake/default.nix +++ b/flake/default.nix @@ -4,28 +4,19 @@ self, }: let - inherit (lib) - attrNames - filterAttrs - genAttrs - flatten - hasSuffix - mapAttrsToList - ; - registryAssembly = import ./registry.nix { inherit lib self; }; collectNixFiles = dir: - flatten ( - mapAttrsToList ( + lib.flatten ( + lib.mapAttrsToList ( name: type: let path = dir + "/${name}"; in if type == "directory" then collectNixFiles path - else if type == "regular" && hasSuffix ".nix" name then + else if type == "regular" && lib.hasSuffix ".nix" name then [ path ] else [ ] @@ -96,9 +87,9 @@ let mkHosts = hostsDir: let - hostNames = attrNames (filterAttrs (_name: type: type == "directory") (builtins.readDir hostsDir)); + hostNames = lib.attrNames (lib.filterAttrs (_name: type: type == "directory") (builtins.readDir hostsDir)); in - genAttrs hostNames (hostName: mkHost { inherit hostName; }); + lib.genAttrs hostNames (hostName: mkHost { inherit hostName; }); in { inherit mkHosts;