23 lines
		
	
	
	
		
			625 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
	
		
			625 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
{ config, ... }:
 | 
						|
{
 | 
						|
  services.nginx = {
 | 
						|
    enable = true;
 | 
						|
    virtualHosts."birdsite.nekover.se" = {
 | 
						|
      forceSSL = true;
 | 
						|
      enableACME = true;
 | 
						|
      locations."/robots.txt" = {
 | 
						|
        return = "200 \"User-agent: *\\nDisallow: /\\n\"";
 | 
						|
      };
 | 
						|
      locations."/" = {
 | 
						|
        proxyPass = "http://${config.services.nitter.server.address}:${builtins.toString config.services.nitter.server.port}";
 | 
						|
        proxyWebsockets = true;
 | 
						|
      };
 | 
						|
      extraConfig = ''
 | 
						|
        listen 0.0.0.0:8443 http2 ssl proxy_protocol;
 | 
						|
 | 
						|
        set_real_ip_from 10.202.41.100;
 | 
						|
        real_ip_header proxy_protocol;
 | 
						|
      '';
 | 
						|
    };
 | 
						|
  };
 | 
						|
}
 |