2020-07-12 15:02:50 +02:00
|
|
|
{ config, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
imports = [
|
|
|
|
./base.nix
|
|
|
|
];
|
|
|
|
|
|
|
|
config = {
|
2021-04-09 22:55:41 +02:00
|
|
|
services.nginx.virtualHosts."cl-shortlink" = {
|
|
|
|
serverName = "cl";
|
|
|
|
extraConfig = "return 302 https://cl.tvl.fyi$request_uri;";
|
|
|
|
};
|
|
|
|
|
2020-07-12 15:02:50 +02:00
|
|
|
services.nginx.virtualHosts.gerrit = {
|
|
|
|
serverName = "cl.tvl.fyi";
|
2021-04-02 12:52:55 +02:00
|
|
|
serverAliases = [ "cl.tvl.su" ];
|
2020-07-12 15:02:50 +02:00
|
|
|
enableACME = true;
|
|
|
|
forceSSL = true;
|
|
|
|
|
|
|
|
extraConfig = ''
|
|
|
|
location / {
|
|
|
|
proxy_pass http://localhost:4778;
|
|
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
2020-11-29 04:18:20 +01:00
|
|
|
# The :443 suffix is a workaround for https://b.tvl.fyi/issues/88.
|
|
|
|
proxy_set_header Host $host:443;
|
2020-07-12 15:02:50 +02:00
|
|
|
}
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|