The Simulacrum: Stage 1 #108
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