63 lines
1.0 KiB
Nix
63 lines
1.0 KiB
Nix
{
|
|
lib,
|
|
inputs,
|
|
self,
|
|
}:
|
|
let
|
|
# TODO: refactor the registry code
|
|
registryAssembly = import ./registry.nix { inherit lib self; };
|
|
|
|
util = import ../lib { inherit lib; };
|
|
mkModules = import ./module.nix { inherit util; };
|
|
|
|
modules = mkModules {
|
|
root = self + "/modules";
|
|
};
|
|
|
|
#----------------------------------------------------------
|
|
guestFiles = util.collectNixFiles (self + "/guests");
|
|
|
|
collectedRegistry = registryAssembly.collect { hosts = self.nixosConfigurations; };
|
|
|
|
specialArgs = {
|
|
inherit
|
|
flake
|
|
inputs
|
|
self
|
|
;
|
|
registry = collectedRegistry;
|
|
};
|
|
|
|
flake = {
|
|
inherit (hosts) mkHosts;
|
|
inherit (guests) mkGuest;
|
|
|
|
inherit util;
|
|
};
|
|
|
|
guests = import ./guest.nix {
|
|
inherit
|
|
inputs
|
|
lib
|
|
self
|
|
specialArgs
|
|
registryAssembly
|
|
util
|
|
;
|
|
repositoryModules = modules;
|
|
};
|
|
|
|
hosts = import ./host.nix {
|
|
inherit
|
|
inputs
|
|
lib
|
|
self
|
|
specialArgs
|
|
guestFiles
|
|
registryAssembly
|
|
;
|
|
repositoryModules = modules;
|
|
};
|
|
in
|
|
flake
|