feat(ops): configure sendemail for gerrit

This configures Gerrit to use the "Gerrit" Message Stream on our "Snix"
server in Postmark.

Change-Id: I4d021919c666aabc94008f9f705163cb9639f1aa
Reviewed-on: https://cl.snix.dev/c/snix/+/30205
Autosubmit: Florian Klink <flokli@flokli.de>
Tested-by: besadii
Reviewed-by: Ryan Lahfa <masterancpp@gmail.com>
This commit is contained in:
Florian Klink 2025-03-20 19:03:54 +00:00 committed by clbot
parent be949fb122
commit 3191a6c8d0
4 changed files with 26 additions and 10 deletions

View file

@ -145,16 +145,17 @@ in
# $site_path/etc/secure.config and is *not* controlled by Nix.
#
# Receiving email is not currently supported.
# sendemail = {
# enable = true;
# html = false;
# connectTimeout = "10sec";
# from = "TVL Code Review <tvlbot@tazj.in>";
# includeDiff = true;
# smtpEncryption = "none";
# smtpServer = "localhost";
# smtpServerPort = 2525;
# };
sendemail = {
enable = true;
html = true; # multi-part, both html and plaintext
connectTimeout = "10sec";
from = "Snix Code Review <gerrit@snix.dev>";
includeDiff = true;
smtpEncryption = "tls";
smtpServer = "smtp.postmarkapp.com";
smtpUser = "PM-T-snix-gerrit-2reTInskye8FLoYt11_";
smtpServerPort = 2525;
};
};
# Replication of the snix repository to secondary machines, for
@ -235,6 +236,8 @@ in
# ... and finally, plop our secrets inside, and give the file to gerrit.
git config -f $CONF plugin.gerrit-oauth-provider-keycloak-oauth.client-secret \
"$(cat ${config.age.secrets.gerrit-oauth-secret.path})"
git config -f $CONF sendemail.smtpPass \
"$(cat ${config.age.secrets.gerrit-sendemail-smtp-pass.path})"
chown git:git $CONF
'';