a291c8690a
GitOrigin-RevId: e6e19f3d81a982a62e1bba08f0b4f7fdc21b4ea0
31 lines
634 B
Nix
31 lines
634 B
Nix
{ config, ... }:
|
|
|
|
{
|
|
imports = [
|
|
./base.nix
|
|
];
|
|
|
|
config = {
|
|
services.nginx.virtualHosts."cs.tvl.fyi" = {
|
|
serverName = "cs.tvl.fyi";
|
|
serverAliases = [ "cs.tvl.su" ];
|
|
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;
|
|
}
|
|
'';
|
|
};
|
|
};
|
|
}
|