nix-infra/hosts/nitter/nginx.nix

30 lines
728 B
Nix
Raw Normal View History

2023-07-10 15:30:51 +02:00
{ ... }:
{
services.nginx = {
enable = true;
enableReload = true;
recommendedGzipSettings = true;
recommendedOptimisation = true;
recommendedProxySettings = true;
recommendedTlsSettings = true;
virtualHosts = {
"nixos-nitter.vs.grzb.de" = {
locations."/robots.txt" = {
return = "200 \"User-agent: *\\nDisallow: /\\n\"";
};
locations."/" = {
proxyPass = "http://localhost:8080";
extraConfig =
"proxy_http_version 1.1;" +
"proxy_set_header Upgrade $http_upgrade;" +
"proxy_set_header Connection \"upgrade\";" +
"proxy_set_header Host $host;"
;
};
};
};
};
}