Co-Authored-By: edef <edef@edef.eu> Co-Authored-by: Ryan Lahfa <raito@lix.systems> Change-Id: Ica1cda177a236814de900f50a8a61d288f58f519
		
			
				
	
	
		
			22 lines
		
	
	
	
		
			501 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
	
		
			501 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
| { config, ... }:
 | |
| {
 | |
|   imports = [
 | |
|     ./base.nix
 | |
|   ];
 | |
| 
 | |
|   services.nginx = {
 | |
|     upstreams.loki = {
 | |
|       servers."127.0.0.1:${toString config.services.loki.configuration.server.http_listen_port}" = { };
 | |
|       extraConfig = "keepalive 16;";
 | |
|     };
 | |
| 
 | |
|     virtualHosts."loki.snix.dev" = {
 | |
|       enableACME = true;
 | |
|       forceSSL = true;
 | |
|       locations."/loki/api/v1/push" = {
 | |
|         proxyPass = "http://loki";
 | |
|         basicAuthFile = config.age.secrets.metrics-push-htpasswd.path;
 | |
|       };
 | |
|     };
 | |
|   };
 | |
| }
 |