chore(ops/modules): Configure besadii call sites to load config

On whitby, the besadii config will live in
/etc/secrets/besadii.json. This CL updates the call sites to pass this
config path to besadii so that it can load Sourcegraph configuration.

Change-Id: Ia139b9fa3b827e7a5f2386214390acc6fe19a75a
This commit is contained in:
Vincent Ambo 2021-11-29 18:53:54 +03:00
parent 168114df52
commit ee635d4645
2 changed files with 14 additions and 3 deletions

View file

@ -3,10 +3,16 @@
let
cfg = config.services.gerrit;
besadiiWithConfig = pkgs.writeShellScript "besadii-whitby" ''
export BESADII_CONFIG=/etc/secrets/besadii.json
exec ${depot.ops.besadii}/bin/besadii
'';
gerritHooks = pkgs.runCommandNoCC "gerrit-hooks" {} ''
mkdir -p $out
ln -s ${depot.ops.besadii}/bin/besadii $out/change-merged
ln -s ${depot.ops.besadii}/bin/besadii $out/patchset-created
ln -s ${besadiiWithConfig} $out/change-merged
ln -s ${besadiiWithConfig} $out/patchset-created
'';
in {
services.gerrit = {