Skip to content

Commit

Permalink
Indent
Browse files Browse the repository at this point in the history
  • Loading branch information
fmaste committed Aug 8, 2022
1 parent 37ead1c commit 3901c3a
Showing 1 changed file with 46 additions and 48 deletions.
94 changes: 46 additions & 48 deletions nix/workbench/profile.nix
@@ -1,50 +1,48 @@
{ pkgs, lib }:
with lib;

{ profileNix
, backend ## Backend-specifics for forwarding
}:
pkgs.runCommand "workbench-profile-output-${profileNix.name}"
{ buildInputs = [];
profileConfigJsonPath = profileNix.JSON;
nodeSpecsJsonPath = profileNix.node-specs.JSON;
backendConfigPath = backend.materialise-profile { inherit profileNix; };
nodeServices =
__toJSON
(flip mapAttrs profileNix.node-services
(name: svc:
with svc;
{ inherit name;
{ pkgs, lib }: with lib;
{ profileNix
, backend ## Backend-specifics for forwarding
}:
pkgs.runCommand "workbench-profile-output-${profileNix.name}"
{ buildInputs = [];
profileConfigJsonPath = profileNix.JSON;
nodeSpecsJsonPath = profileNix.node-specs.JSON;
backendConfigPath = backend.materialise-profile { inherit profileNix; };
nodeServices =
__toJSON
(flip mapAttrs profileNix.node-services
(name: svc:
with svc;
{ inherit name;
service-config = serviceConfig.JSON;
start = startupScript;
config = nodeConfig.JSON;
topology = topology.JSON;
}));
generatorService =
with profileNix.generator-service;
__toJSON
{ name = "generator";
service-config = serviceConfig.JSON;
start = startupScript;
config = nodeConfig.JSON;
topology = topology.JSON;
}));
generatorService =
with profileNix.generator-service;
__toJSON
{ name = "generator";
service-config = serviceConfig.JSON;
start = startupScript;
run-script = runScript.JSON;
};
tracerService =
with profileNix.tracer-service;
__toJSON
{ name = "tracer";
tracer-config = tracer-config.JSON;
nixos-service-config = nixos-service-config.JSON;
config = config.JSON;
start = startupScript;
};
passAsFile = [ "nodeServices" "generatorService" "tracerService" ];
}
''
mkdir $out
cp $profileConfigJsonPath $out/profile.json
cp $nodeSpecsJsonPath $out/node-specs.json
cp $backendConfigPath/* $out
cp $nodeServicesPath $out/node-services.json
cp $generatorServicePath $out/generator-service.json
cp $tracerServicePath $out/tracer-service.json
''
run-script = runScript.JSON;
};
tracerService =
with profileNix.tracer-service;
__toJSON
{ name = "tracer";
tracer-config = tracer-config.JSON;
nixos-service-config = nixos-service-config.JSON;
config = config.JSON;
start = startupScript;
};
passAsFile = [ "nodeServices" "generatorService" "tracerService" ];
}
''
mkdir $out
cp $profileConfigJsonPath $out/profile.json
cp $nodeSpecsJsonPath $out/node-specs.json
cp $backendConfigPath/* $out
cp $nodeServicesPath $out/node-services.json
cp $generatorServicePath $out/generator-service.json
cp $tracerServicePath $out/tracer-service.json
''

0 comments on commit 3901c3a

Please sign in to comment.