feat(inventory/instances): add service result to nixos machines
This commit is contained in:
@@ -77,6 +77,9 @@ let
|
|||||||
# Inherit the inventory assertions ?
|
# Inherit the inventory assertions ?
|
||||||
# { inherit (mergedInventory) assertions; }
|
# { inherit (mergedInventory) assertions; }
|
||||||
{ imports = inventoryClass.machines.${name}.machineImports or [ ]; }
|
{ imports = inventoryClass.machines.${name}.machineImports or [ ]; }
|
||||||
|
|
||||||
|
# Import the distribute services
|
||||||
|
{ imports = config.clanInternals.distributedServices.allMachines.${name} or []; }
|
||||||
(
|
(
|
||||||
{
|
{
|
||||||
# Settings
|
# Settings
|
||||||
|
|||||||
@@ -183,8 +183,17 @@ let
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
) { } importedModuleWithInstances;
|
) { } 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
|
in
|
||||||
{
|
{
|
||||||
inherit importedModuleWithInstances grouped;
|
inherit importedModuleWithInstances grouped;
|
||||||
inherit evals;
|
inherit evals allMachines;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user