about summary refs log tree commit diff
path: root/ops/modules/monorepo-gerrit.nix
diff options
context:
space:
mode:
Diffstat (limited to 'ops/modules/monorepo-gerrit.nix')
-rw-r--r--ops/modules/monorepo-gerrit.nix8
1 files changed, 4 insertions, 4 deletions
diff --git a/ops/modules/monorepo-gerrit.nix b/ops/modules/monorepo-gerrit.nix
index d9507db56e92..57f2edc846bb 100644
--- a/ops/modules/monorepo-gerrit.nix
+++ b/ops/modules/monorepo-gerrit.nix
@@ -4,15 +4,15 @@
 let
   cfg = config.services.gerrit;
 
-  besadiiWithConfig = pkgs.writeShellScript "besadii-whitby" ''
+  besadiiWithConfig = name: pkgs.writeShellScript "besadii-whitby" ''
     export BESADII_CONFIG=/etc/secrets/besadii.json
-    exec ${depot.ops.besadii}/bin/besadii
+    exec -a ${name} ${depot.ops.besadii}/bin/besadii "$@"
   '';
 
   gerritHooks = pkgs.runCommandNoCC "gerrit-hooks" {} ''
     mkdir -p $out
-    ln -s ${besadiiWithConfig} $out/change-merged
-    ln -s ${besadiiWithConfig} $out/patchset-created
+    ln -s ${besadiiWithConfig "change-merged"} $out/change-merged
+    ln -s ${besadiiWithConfig "patchset-created"} $out/patchset-created
   '';
 in {
   services.gerrit = {