refactor(flake): inline assembly wiring
This commit is contained in:
@@ -4,55 +4,50 @@
|
||||
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 {
|
||||
registry = import ./registry.nix {
|
||||
inherit lib;
|
||||
hosts = self.nixosConfigurations;
|
||||
root = self + "/registry";
|
||||
};
|
||||
|
||||
modules = import ./module.nix {
|
||||
inherit util;
|
||||
root = self + "/modules";
|
||||
};
|
||||
|
||||
guestModules = guests.mkGuests {
|
||||
guestModules = import ./guest.nix {
|
||||
inherit
|
||||
inputs
|
||||
lib
|
||||
registry
|
||||
specialArgs
|
||||
util
|
||||
;
|
||||
repositoryModules = modules;
|
||||
root = self + "/guests";
|
||||
};
|
||||
|
||||
#----------------------------------------------------------
|
||||
|
||||
collectedRegistry = registryAssembly.collect { hosts = self.nixosConfigurations; };
|
||||
|
||||
specialArgs = {
|
||||
inherit
|
||||
inputs
|
||||
self
|
||||
util
|
||||
;
|
||||
registry = collectedRegistry;
|
||||
registry = registry.collected;
|
||||
};
|
||||
|
||||
guests = import ./guest.nix {
|
||||
inherit
|
||||
inputs
|
||||
lib
|
||||
specialArgs
|
||||
registryAssembly
|
||||
util
|
||||
;
|
||||
repositoryModules = modules;
|
||||
};
|
||||
|
||||
hosts = import ./host.nix {
|
||||
in
|
||||
{
|
||||
nixosConfigurations = import ./host.nix {
|
||||
inherit
|
||||
inputs
|
||||
lib
|
||||
specialArgs
|
||||
guestModules
|
||||
registryAssembly
|
||||
;
|
||||
registryModule = registry.module;
|
||||
repositoryModules = modules;
|
||||
root = self + "/hosts";
|
||||
};
|
||||
in
|
||||
{
|
||||
inherit (hosts) mkHosts;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user