{ ... }: { 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;" ; }; }; }; }; }