2020-07-22 01:40:49 +02:00
|
|
|
{ config, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
imports = [
|
|
|
|
./base.nix
|
|
|
|
];
|
|
|
|
|
|
|
|
config = {
|
2021-04-09 22:55:41 +02:00
|
|
|
services.nginx.virtualHosts."b-shortlink" = {
|
|
|
|
serverName = "b";
|
|
|
|
extraConfig = "return 302 https://b.tvl.fyi$request_uri;";
|
|
|
|
};
|
|
|
|
|
2020-07-22 01:40:49 +02:00
|
|
|
services.nginx.virtualHosts."b.tvl.fyi" = {
|
|
|
|
serverName = "b.tvl.fyi";
|
2021-04-02 12:52:55 +02:00
|
|
|
serverAliases = [ "b.tvl.su" ];
|
2020-07-22 01:40:49 +02:00
|
|
|
enableACME = true;
|
|
|
|
forceSSL = true;
|
|
|
|
|
|
|
|
extraConfig = ''
|
2021-04-09 22:55:41 +02:00
|
|
|
# Forward short links to issues to the issue itself (b/32)
|
|
|
|
location ~ ^/(\d+)$ {
|
|
|
|
return 302 https://b.tvl.fyi/issues$request_uri;
|
|
|
|
}
|
|
|
|
|
2020-07-22 01:40:49 +02:00
|
|
|
location / {
|
|
|
|
proxy_pass http://localhost:${toString config.services.depot.panettone.port};
|
|
|
|
}
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|