Add common nginx configuration for upcoming nginx hosts
This commit is contained in:
		
					parent
					
						
							
								3fd9964110
							
						
					
				
			
			
				commit
				
					
						30b4139d23
					
				
			
		
					 1 changed files with 26 additions and 0 deletions
				
			
		
							
								
								
									
										26
									
								
								config/common/nginx.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								config/common/nginx.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,26 @@ | |||
| # Common nginx configuration. | ||||
| # Sources for this configuration: | ||||
| # - https://nixos.wiki/wiki/Nginx | ||||
| # - Julians nginx Ansible role | ||||
| 
 | ||||
| { config, pkgs, ... }: | ||||
| 
 | ||||
| { | ||||
|   services.nginx = { | ||||
|     # See here: | ||||
|     # - https://github.com/NixOS/nixpkgs/blob/2809915f19bd120f840bea27fbf915a546c08878/nixos/modules/services/web-servers/nginx/default.nix#L178 | ||||
|     # apparently follows: | ||||
|     # - https://ssl-config.mozilla.org/ | ||||
|     recommendedTlsSettings = true; | ||||
|     # See here: | ||||
|     # - https://github.com/NixOS/nixpkgs/blob/2809915f19bd120f840bea27fbf915a546c08878/nixos/modules/services/web-servers/nginx/default.nix#L203 | ||||
|     # - https://docs.nginx.com/nginx/admin-guide/web-server/compression/ | ||||
|     recommendedGzipSettings = true; | ||||
|     # See here: | ||||
|     # - https://github.com/NixOS/nixpkgs/blob/2809915f19bd120f840bea27fbf915a546c08878/nixos/modules/services/web-servers/nginx/default.nix#L166 | ||||
|     recommendedOptimisation = true; | ||||
|     # See here: | ||||
|     # - https://github.com/NixOS/nixpkgs/blob/2809915f19bd120f840bea27fbf915a546c08878/nixos/modules/services/web-servers/nginx/default.nix#L223 | ||||
|     recommendedProxySettings = true; | ||||
|   }; | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue