From a342bdb80bc4f8550f460795c6151fe5e4e42567 Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Thu, 11 Jun 2020 22:49:37 +0100 Subject: feat(monorepo-gerrit): link to git.tazj.in as source browser Change-Id: Ia31389a958c1927b63dfebb7c2ed2054177410b4 Reviewed-on: https://cl.tvl.fyi/c/depot/+/23 Reviewed-by: tazjin --- ops/nixos/modules/monorepo-gerrit.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'ops') diff --git a/ops/nixos/modules/monorepo-gerrit.nix b/ops/nixos/modules/monorepo-gerrit.nix index f09258a498..48e7a28037 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 = { -- cgit 1.4.1