The Simulacrum: Stage 1 #108
1 changed files with 7 additions and 1 deletions
|
@ -4,9 +4,15 @@
|
||||||
|
|
||||||
let
|
let
|
||||||
serviceConfig = config.cluster.config.services.${service};
|
serviceConfig = config.cluster.config.services.${service};
|
||||||
serviceList = [ service ] ++ serviceConfig.simulacrum.deps;
|
serviceList = getDepsRecursive [] service;
|
||||||
allAugments = map (svc: config.cluster.config.services.${svc}.simulacrum.augments) serviceList;
|
allAugments = map (svc: config.cluster.config.services.${svc}.simulacrum.augments) serviceList;
|
||||||
|
|
||||||
|
getDepsRecursive = acc: service: let
|
||||||
|
deps = lib.subtractLists acc config.cluster.config.services.${service}.simulacrum.deps;
|
||||||
|
acc' = acc ++ [ service ];
|
||||||
|
recurse = getDepsRecursive acc';
|
||||||
|
in lib.unique (lib.flatten ([ service ] ++ map recurse deps));
|
||||||
|
|
||||||
lift = config;
|
lift = config;
|
||||||
|
|
||||||
snakeoil = {
|
snakeoil = {
|
||||||
|
|
Loading…
Reference in a new issue