2020-07-12 13:54:16 +02:00
|
|
|
{ config, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
imports = [
|
|
|
|
./base.nix
|
|
|
|
];
|
|
|
|
|
|
|
|
config = {
|
|
|
|
services.nginx.virtualHosts."cs.tvl.fyi" = {
|
|
|
|
serverName = "cs.tvl.fyi";
|
2021-04-02 12:52:55 +02:00
|
|
|
serverAliases = [ "cs.tvl.su" ];
|
2020-07-12 13:54:16 +02:00
|
|
|
enableACME = true;
|
|
|
|
forceSSL = true;
|
|
|
|
|
|
|
|
extraConfig = ''
|
|
|
|
location = / {
|
|
|
|
return 301 https://cs.tvl.fyi/depot;
|
|
|
|
}
|
|
|
|
|
|
|
|
location / {
|
|
|
|
proxy_set_header X-Sg-Auth "Anonymous";
|
|
|
|
proxy_pass http://localhost:${toString config.services.depot.sourcegraph.port};
|
|
|
|
}
|
|
|
|
|
|
|
|
location /users/Anonymous/settings {
|
|
|
|
return 301 https://cs.tvl.fyi;
|
|
|
|
}
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|