about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-05-26 09:11:31 -0700
committerFranck Cuny <franck@fcuny.net>2022-05-26 09:11:31 -0700
commit92cdc5df5ebe3fecbc59d0ec6a901fda28067862 (patch)
tree35cda87883edca7434bd760d8788351b9252a0f5
parentfix(gerrit): force gerrit to run as the git user (diff)
downloadworld-92cdc5df5ebe3fecbc59d0ec6a901fda28067862.tar.gz
feat(gerrit): use OAUTH for authentication
-rw-r--r--modules/services/gerrit/default.nix10
1 files changed, 10 insertions, 0 deletions
diff --git a/modules/services/gerrit/default.nix b/modules/services/gerrit/default.nix
index df285d3..9db7b46 100644
--- a/modules/services/gerrit/default.nix
+++ b/modules/services/gerrit/default.nix
@@ -18,6 +18,8 @@ in {
       builtinPlugins = [ "download-commands" "hooks" ];
       jvmHeapLimit = "4g";
 
+      plugins = [ owners oauth ];
+
       settings = {
         core.packedGitLimit = "100m";
         log.jsonLogging = true;
@@ -40,6 +42,14 @@ in {
         # Receiving email is not currently supported.
         sendemail = { enable = false; };
       };
+
+      auth.type = "OAUTH";
+
+      # users can change their emails
+      oauth.allowRegisterNewEmail = true;
+
+      # use gerrit HTTP password
+      auth.gitBasicAuthPolicy = "HTTP";
     };
 
     systemd.services.gerrit = {