refactor(lib): move nix file discovery helper

This commit is contained in:
2026-08-28 11:23:12 -04:00
parent d43452a8d3
commit 0f9b639c0d
3 changed files with 6 additions and 4 deletions

View File

@@ -4,12 +4,12 @@
self,
}:
let
# TODO: refactor the registry code
registryAssembly = import ./registry.nix { inherit lib self; };
modules = import ./modules.nix { inherit lib; };
flakeLib = import ../lib { inherit lib; };
moduleFiles = modules.mkModules (self + "/modules");
guestFiles = modules.mkModules (self + "/guests");
moduleFiles = flakeLib.collectNixFiles (self + "/modules");
guestFiles = flakeLib.collectNixFiles (self + "/guests");
collectedRegistry = registryAssembly.collect { hosts = self.nixosConfigurations; };

View File

@@ -1,7 +1,9 @@
{ lib }:
let
files = import ./files.nix { inherit lib; };
network = import ./network.nix { inherit lib; };
in
{
inherit (files) collectNixFiles;
inherit (network) bridgeName deriveMac;
}

View File

@@ -18,5 +18,5 @@ let
);
in
{
mkModules = collectNixFiles;
inherit collectNixFiles;
}