diff options
author | Vincent Ambo <mail@tazj.in> | 2020-06-12T22·19+0100 |
---|---|---|
committer | tazjin <mail@tazj.in> | 2020-06-12T22·36+0000 |
commit | de4f540ed108996e82cf687c29aacf520dda7d11 (patch) | |
tree | 66955f6f929f4cb17d4773a0d157df99fd0e1aa6 /ops/nixos/modules | |
parent | faf9d39f4c3ba799db744d0287a142e423df9787 (diff) |
feat(monorepo-gerrit): Configure outbound emails for reviews r/923
Configures Gerrit send emails from tvlbot@tazj.in for outgoing review notifications. Emails are always plain-text and can contain diffs (up to a maximum size of 256KiB). The configuration options for this are documented at: https://gerrit-review.googlesource.com/Documentation/config-gerrit.html#sendemail Note: The password for this user is stored on the host, in a file that is not part of version-control and is only readable by the 'git' user. We should probably figure out a way to do secrets management ... Change-Id: I2f99b34b1a774c28d814b0aba1f1b78fd512854e Reviewed-on: https://cl.tvl.fyi/c/depot/+/92 Reviewed-by: riking <rikingcoding@gmail.com>
Diffstat (limited to 'ops/nixos/modules')
-rw-r--r-- | ops/nixos/modules/monorepo-gerrit.nix | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/ops/nixos/modules/monorepo-gerrit.nix b/ops/nixos/modules/monorepo-gerrit.nix index b51a6d8b294c..174c59948e29 100644 --- a/ops/nixos/modules/monorepo-gerrit.nix +++ b/ops/nixos/modules/monorepo-gerrit.nix @@ -45,6 +45,25 @@ in { # TODO(tazjin): Assuming this is what we'll be doing ... groupMemberPattern = "(&(objectClass=group)(member=\${dn}))"; }; + + # Email sending (emails are relayed via the tazj.in domain's + # GSuite currently). + # + # Note that sendemail.smtpPass is stored in + # $site_path/etc/secure.config and is *not* controlled by Nix. + # + # Receiving email is not currently supported. + sendemail = { + enable = true; + html = false; + connectTimeout = "30sec"; + from = "TVL Code Review <tvlbot@tazj.in>"; + includeDiff = true; + smtpEncryption = "tls"; + smtpServer = "smtp.gmail.com"; + smtpServerPort = 587; + smtpUser = "tvlbot@tazj.in"; + }; }; }; |