about summary refs log tree commit diff
path: root/ops/nixos/modules/monorepo-gerrit.nix
diff options
context:
space:
mode:
authorLuke Granger-Brown <git@lukegb.com>2020-06-11T21·49+0100
committerlukegb <lukegb@tvl.fyi>2020-06-11T22·17+0000
commita342bdb80bc4f8550f460795c6151fe5e4e42567 (patch)
tree72415f28ed7bdabe1f659055743b6a6d8d31c5e4 /ops/nixos/modules/monorepo-gerrit.nix
parentdd6648063513950b19155bb8a7b741fb1d83180a (diff)
feat(monorepo-gerrit): link to git.tazj.in as source browser r/909
Change-Id: Ia31389a958c1927b63dfebb7c2ed2054177410b4
Reviewed-on: https://cl.tvl.fyi/c/depot/+/23
Reviewed-by: tazjin <mail@tazj.in>
Diffstat (limited to 'ops/nixos/modules/monorepo-gerrit.nix')
-rw-r--r--ops/nixos/modules/monorepo-gerrit.nix14
1 files changed, 14 insertions, 0 deletions
diff --git a/ops/nixos/modules/monorepo-gerrit.nix b/ops/nixos/modules/monorepo-gerrit.nix
index f09258a498eb..48e7a28037e9 100644
--- a/ops/nixos/modules/monorepo-gerrit.nix
+++ b/ops/nixos/modules/monorepo-gerrit.nix
@@ -17,6 +17,20 @@ in {
       gerrit.canonicalWebUrl = "https://cl.tvl.fyi";
       httpd.listenUrl = "proxy-https://${cfg.listenAddress}";
 
+      # Configure for cgit.
+      gitweb = {
+        type = "custom";
+        url = "https://git.tazj.in";
+        project = "/";
+        revision = "/commit/?id=\${commit}";
+        branch = "/log/?h=\${branch}";
+        tag = "/tag/?h=\${tag}";
+        roottree = "/tree/?h=\${commit}";
+        file = "/tree/\${file}?h=\${commit}";
+        filehistory = "/log/\${file}?h=\${branch}";
+        linkname = "cgit";
+      };
+
       # Configures integration with the locally running OpenLDAP
       auth.type = "LDAP";
       ldap = {