Add metrics-nekomesh host
This commit is contained in:
		
					parent
					
						
							
								1ad857a33a
							
						
					
				
			
			
				commit
				
					
						3fcd427251
					
				
			
		
					 10 changed files with 138 additions and 0 deletions
				
			
		
							
								
								
									
										27
									
								
								config/hosts/metrics-nekomesh/nginx.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								config/hosts/metrics-nekomesh/nginx.nix
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,27 @@
 | 
			
		|||
{ config, ... }:
 | 
			
		||||
{
 | 
			
		||||
  services.nginx = {
 | 
			
		||||
    enable = true;
 | 
			
		||||
    virtualHosts = {
 | 
			
		||||
      ${config.services.grafana.settings.server.domain} = {
 | 
			
		||||
        forceSSL = true;
 | 
			
		||||
        enableACME = true;
 | 
			
		||||
        listen = [
 | 
			
		||||
          {
 | 
			
		||||
            addr = "0.0.0.0";
 | 
			
		||||
            port = 80;
 | 
			
		||||
          }
 | 
			
		||||
          {
 | 
			
		||||
            addr = "0.0.0.0";
 | 
			
		||||
            port = 443;
 | 
			
		||||
            ssl = true;
 | 
			
		||||
          }
 | 
			
		||||
        ];
 | 
			
		||||
        locations."/" = {
 | 
			
		||||
          proxyPass = "http://${config.services.grafana.settings.server.http_addr}:${builtins.toString config.services.grafana.settings.server.http_port}";
 | 
			
		||||
          proxyWebsockets = true;
 | 
			
		||||
        };
 | 
			
		||||
      };
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue