about summary refs log tree commit diff
path: root/modules/services
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-05-28 18:27:16 -0700
committerFranck Cuny <franck@fcuny.net>2022-05-28 18:29:59 -0700
commit466a313730d88a1bde3cb3c8ad5a95e6f5f8abd7 (patch)
tree4fd0fc8c09130b199f42fd234117c37deb31f14c /modules/services
parentfeat(cgit): generate the list of projects from gerrit (diff)
downloadworld-466a313730d88a1bde3cb3c8ad5a95e6f5f8abd7.tar.gz
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 <franck@fcuny.net>
Diffstat (limited to 'modules/services')
-rw-r--r--modules/services/gerrit/default.nix14
1 files changed, 14 insertions, 0 deletions
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