diff options
author | Vincent Ambo <mail@tazj.in> | 2020-06-30T23·15+0100 |
---|---|---|
committer | tazjin <mail@tazj.in> | 2020-06-30T23·39+0000 |
commit | feb3f1a374d199aa4c7773b7ade4af2faa7b7530 (patch) | |
tree | e1cb89e408084d9bb941a44df3992b06312328ba /users/tazjin/nixos | |
parent | 7839b7b7a3a0433cc6eca411f96e8032e45d9f0d (diff) |
feat(nixos/clbot): Add a module for running clbot r/1142
Change-Id: I9c10906441c3222b74bcc820a67f11d96462fcfa Reviewed-on: https://cl.tvl.fyi/c/depot/+/821 Tested-by: BuildkiteCI Reviewed-by: lukegb <lukegb@tvl.fyi> Reviewed-by: BuildkiteCI
Diffstat (limited to 'users/tazjin/nixos')
-rw-r--r-- | users/tazjin/nixos/camden/default.nix | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/users/tazjin/nixos/camden/default.nix b/users/tazjin/nixos/camden/default.nix index 342729c54a7f..8927b2e85ae5 100644 --- a/users/tazjin/nixos/camden/default.nix +++ b/users/tazjin/nixos/camden/default.nix @@ -15,10 +15,11 @@ config: let }; in lib.fix(self: { imports = [ + "${depot.depotPath}/ops/nixos/clbot.nix" "${depot.depotPath}/ops/nixos/depot.nix" "${depot.depotPath}/ops/nixos/monorepo-gerrit.nix" - "${depot.depotPath}/ops/nixos/sourcegraph.nix" "${depot.depotPath}/ops/nixos/smtprelay.nix" + "${depot.depotPath}/ops/nixos/sourcegraph.nix" "${depot.depotPath}/ops/nixos/tvl-slapd/default.nix" "${pkgs.nixpkgsSrc}/nixos/modules/services/web-apps/gerrit.nix" ]; @@ -266,6 +267,27 @@ in lib.fix(self: { }; }; + # Start the Gerrit->IRC bot + services.depot.clbot = { + enable = true; + + # Almost all configuration values are already correct (well, duh), + # see //fun/clbot for details. + flags = { + gerrit_host = "localhost:29418"; + gerrit_ssh_auth_username = "clbot"; + gerrit_ssh_auth_key = "/etc/secrets/clbot-key"; + irc_server = "qwerty.zxcvbnm.ninja:6697"; + + notify_branches = "canon,refs/meta/config"; + notify_repo = "depot"; + + # This secret is read from an environment variable, which is + # populated from /etc/secrets/clbot + irc_pass = "$CLBOT_PASS"; + }; + }; + # serve my website(s) services.nginx = { enable = true; |