cluster/simulacrum: recursive service deps
This commit is contained in:
parent
98c66452c1
commit
d54914063e
1 changed files with 7 additions and 1 deletions
|
@ -4,9 +4,15 @@
|
|||
|
||||
let
|
||||
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;
|
||||
|
||||
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;
|
||||
|
||||
snakeoil = {
|
||||
|
|
Loading…
Reference in a new issue