refactor(lib): move nix file discovery helper
This commit is contained in:
@@ -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; };
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -18,5 +18,5 @@ let
|
||||
);
|
||||
in
|
||||
{
|
||||
mkModules = collectNixFiles;
|
||||
inherit collectNixFiles;
|
||||
}
|
||||
Reference in New Issue
Block a user