From afe0841e9d696d3ac8ff447909c416c48ba90836 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Sun, 7 Jun 2020 19:30:52 +0100 Subject: feat(ops/nixos): Add module for configuring Gerrit for the repo --- ops/nixos/camden/default.nix | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'ops/nixos/camden/default.nix') diff --git a/ops/nixos/camden/default.nix b/ops/nixos/camden/default.nix index 9496d14b5a89..5db84ef50e7f 100644 --- a/ops/nixos/camden/default.nix +++ b/ops/nixos/camden/default.nix @@ -9,6 +9,8 @@ in lib.fix(self: { imports = [ ../modules/depot.nix ../modules/hound.nix + ../modules/monorepo-gerrit.nix + "${pkgs.nixpkgsSrc}/nixos/modules/services/web-apps/gerrit.nix" ]; depot = depot; @@ -108,7 +110,6 @@ in lib.fix(self: { (with depot; [ fun.idual.script fun.idual.setAlarm - third_party.honk third_party.pounce ]) ++ @@ -230,6 +231,11 @@ in lib.fix(self: { group = "nginx"; webroot = "/var/lib/acme/acme-challenge"; postRun = "systemctl reload nginx"; + extraDomains = { + "cl.tvl.fyi" = null; + "code.tvl.fyi" = null; + "cs.tvl.fyi" = null; + }; }; }; @@ -395,6 +401,18 @@ in lib.fix(self: { } ''; }; + + virtualHosts.gerrit = { + serverName = "cl.tvl.fyi"; + useACMEHost = "tvl.fyi"; + forceSSL = true; + + extraConfig = '' + location / { + proxy_pass http://localhost:4778; + } + ''; + }; }; # Timer units that can be started with systemd-run to set my alarm. -- cgit 1.4.1