feat(whitby): Enable SourceGraph server
Change-Id: Ia8a20d54a4ac77d64f5e3fd2255ffad78dce0fb0 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1067 Tested-by: BuildkiteCI Reviewed-by: lukegb <lukegb@tvl.fyi>
This commit is contained in:
		
							parent
							
								
									6ed4e7d4d1
								
							
						
					
					
						commit
						93575158c6
					
				
					 2 changed files with 36 additions and 1 deletions
				
			
		
							
								
								
									
										30
									
								
								ops/nixos/www/cs.tvl.fyi.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								ops/nixos/www/cs.tvl.fyi.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,30 @@ | |||
| { config, ... }: | ||||
| 
 | ||||
| { | ||||
|   imports = [ | ||||
|     ./base.nix | ||||
|   ]; | ||||
| 
 | ||||
|   config = { | ||||
|     services.nginx.virtualHosts."cs.tvl.fyi" = { | ||||
|       serverName = "cs.tvl.fyi"; | ||||
|       enableACME = true; | ||||
|       forceSSL = true; | ||||
| 
 | ||||
|       extraConfig = '' | ||||
|         location = / { | ||||
|           return 301 https://cs.tvl.fyi/depot; | ||||
|         } | ||||
| 
 | ||||
|         location / { | ||||
|           proxy_set_header X-Sg-Auth "Anonymous"; | ||||
|           proxy_pass http://localhost:${toString config.services.depot.sourcegraph.port}; | ||||
|         } | ||||
| 
 | ||||
|         location /users/Anonymous/settings { | ||||
|           return 301 https://cs.tvl.fyi; | ||||
|         } | ||||
|       ''; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue