c4fb0432ae
GitOrigin-RevId: 3fc1143a04da49a92c3663813c6a0c1e8ccd477f
30 lines
595 B
Nix
30 lines
595 B
Nix
{ config, ... }:
|
|
|
|
{
|
|
imports = [
|
|
./base.nix
|
|
];
|
|
|
|
config = {
|
|
services.nginx.virtualHosts."cs.tvl.fyi" = {
|
|
serverName = "cs.tvl.fyi";
|
|
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;
|
|
}
|
|
'';
|
|
};
|
|
};
|
|
}
|