From 466a313730d88a1bde3cb3c8ad5a95e6f5f8abd7 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Sat, 28 May 2022 18:27:16 -0700 Subject: feat(gerrit): link to cgit Configure gitweb to link to our cgit instance Change-Id: I55cb96e7199bf2636a30689b277978008d6605eb Reviewed-on: https://cl.fcuny.net/c/world/+/88 Reviewed-by: Franck Cuny --- modules/services/gerrit/default.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/modules/services/gerrit/default.nix b/modules/services/gerrit/default.nix index a3e5e78..0f83165 100644 --- a/modules/services/gerrit/default.nix +++ b/modules/services/gerrit/default.nix @@ -57,6 +57,20 @@ in { download.command = [ "checkout" "cherry_pick" "format_patch" "pull" ]; + # Configure for cgit. + gitweb = { + type = "custom"; + url = "https://git.fcuny.net"; + project = "/\${project}.git"; + 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"; + }; + auth.type = "OAUTH"; # users can change their emails -- cgit 1.4.1