feat(ops/nixos): Add module for configuring Gerrit for the repo
This commit is contained in:
parent
b7766431f4
commit
afe0841e9d
3 changed files with 36 additions and 1 deletions
|
@ -9,6 +9,8 @@ in lib.fix(self: {
|
||||||
imports = [
|
imports = [
|
||||||
../modules/depot.nix
|
../modules/depot.nix
|
||||||
../modules/hound.nix
|
../modules/hound.nix
|
||||||
|
../modules/monorepo-gerrit.nix
|
||||||
|
"${pkgs.nixpkgsSrc}/nixos/modules/services/web-apps/gerrit.nix"
|
||||||
];
|
];
|
||||||
depot = depot;
|
depot = depot;
|
||||||
|
|
||||||
|
@ -108,7 +110,6 @@ in lib.fix(self: {
|
||||||
(with depot; [
|
(with depot; [
|
||||||
fun.idual.script
|
fun.idual.script
|
||||||
fun.idual.setAlarm
|
fun.idual.setAlarm
|
||||||
third_party.honk
|
|
||||||
third_party.pounce
|
third_party.pounce
|
||||||
]) ++
|
]) ++
|
||||||
|
|
||||||
|
@ -230,6 +231,11 @@ in lib.fix(self: {
|
||||||
group = "nginx";
|
group = "nginx";
|
||||||
webroot = "/var/lib/acme/acme-challenge";
|
webroot = "/var/lib/acme/acme-challenge";
|
||||||
postRun = "systemctl reload nginx";
|
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.
|
# Timer units that can be started with systemd-run to set my alarm.
|
||||||
|
|
16
ops/nixos/modules/monorepo-gerrit.nix
Normal file
16
ops/nixos/modules/monorepo-gerrit.nix
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
# Gerrit configuration for the TVL monorepo
|
||||||
|
{ pkgs, config, lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
services.gerrit = {
|
||||||
|
enable = true;
|
||||||
|
listenAddress = "[::]:4778"; # 4778 - grrt
|
||||||
|
serverId = "4fdfa107-4df9-4596-8e0a-1d2bbdd96e36";
|
||||||
|
settings = {
|
||||||
|
core.packedGitLimit = "100m";
|
||||||
|
log.jsonLogging = true;
|
||||||
|
log.textLogging = false;
|
||||||
|
# TODO: gitweb config
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
1
third_party/default.nix
vendored
1
third_party/default.nix
vendored
|
@ -58,6 +58,7 @@ let
|
||||||
fira-mono
|
fira-mono
|
||||||
fontconfig
|
fontconfig
|
||||||
freetype
|
freetype
|
||||||
|
gerrit
|
||||||
gettext
|
gettext
|
||||||
glibc
|
glibc
|
||||||
gmock
|
gmock
|
||||||
|
|
Loading…
Reference in a new issue