refactor(flake): qualify nixpkgs lib calls

This commit is contained in:
2026-08-28 09:32:15 -04:00
parent 41b9d41776
commit a8aa5b6fb5

View File

@@ -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;