feat(inventory/instances): add service result to nixos machines
This commit is contained in:
@@ -77,6 +77,9 @@ let
|
||||
# Inherit the inventory assertions ?
|
||||
# { inherit (mergedInventory) assertions; }
|
||||
{ imports = inventoryClass.machines.${name}.machineImports or [ ]; }
|
||||
|
||||
# Import the distribute services
|
||||
{ imports = config.clanInternals.distributedServices.allMachines.${name} or []; }
|
||||
(
|
||||
{
|
||||
# Settings
|
||||
|
||||
@@ -183,8 +183,17 @@ let
|
||||
];
|
||||
}
|
||||
) { } importedModuleWithInstances;
|
||||
|
||||
# TODO: Return an attribute set of resources instead of a plain list of nixosModules
|
||||
allMachines = lib.foldlAttrs (
|
||||
acc: _name: eval:
|
||||
acc
|
||||
// lib.mapAttrs (
|
||||
machineName: result: acc.${machineName} or [ ] ++ [ result.nixosModule ]
|
||||
) eval.config.result.final
|
||||
) { } evals;
|
||||
in
|
||||
{
|
||||
inherit importedModuleWithInstances grouped;
|
||||
inherit evals;
|
||||
inherit evals allMachines;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user