2020-09-30 03:42:59 +00:00
|
|
|
{ config, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
imports = [
|
|
|
|
./base.nix
|
|
|
|
];
|
|
|
|
|
|
|
|
config = {
|
2022-05-19 14:39:52 +00:00
|
|
|
services.nginx.virtualHosts."cl-shortlink" = {
|
|
|
|
serverName = "cl";
|
|
|
|
extraConfig = "return 302 https://cl.tvl.fyi$request_uri;";
|
|
|
|
};
|
|
|
|
|
2020-09-30 03:42:59 +00:00
|
|
|
services.nginx.virtualHosts.gerrit = {
|
|
|
|
serverName = "cl.tvl.fyi";
|
2022-05-19 14:39:52 +00:00
|
|
|
serverAliases = [ "cl.tvl.su" ];
|
2020-09-30 03:42:59 +00:00
|
|
|
enableACME = true;
|
|
|
|
forceSSL = true;
|
|
|
|
|
|
|
|
extraConfig = ''
|
|
|
|
location / {
|
|
|
|
proxy_pass http://localhost:4778;
|
|
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
2022-05-19 14:39:52 +00:00
|
|
|
# The :443 suffix is a workaround for https://b.tvl.fyi/issues/88.
|
|
|
|
proxy_set_header Host $host:443;
|
2020-09-30 03:42:59 +00:00
|
|
|
}
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|