Most of the ecosystem has moved to this formatter, and many people configured their editors to autoformat it with this formatter. Closes: https://git.snix.dev/snix/snix/issues/62 Change-Id: Icf39e7836c91fc2ae49fbe22a40a639105bfb0bd Reviewed-on: https://cl.snix.dev/c/snix/+/30671 Reviewed-by: Florian Klink <flokli@flokli.de> Tested-by: besadii Autosubmit: Ilan Joselevich <personal@ilanjoselevich.com>
		
			
				
	
	
		
			46 lines
		
	
	
	
		
			1.1 KiB
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			46 lines
		
	
	
	
		
			1.1 KiB
		
	
	
	
		
			Nix
		
	
	
	
	
	
| { config, pkgs, ... }:
 | |
| 
 | |
| {
 | |
|   config = {
 | |
|     networking.firewall.allowedTCPPorts = [
 | |
|       80
 | |
|       443
 | |
|     ];
 | |
| 
 | |
|     security.acme = {
 | |
|       acceptTerms = true;
 | |
|       defaults.email = "acme@snix.dev";
 | |
|     };
 | |
| 
 | |
|     services.nginx = {
 | |
|       enable = true;
 | |
|       enableReload = true;
 | |
| 
 | |
|       recommendedTlsSettings = true;
 | |
|       recommendedGzipSettings = true;
 | |
|       recommendedProxySettings = true;
 | |
| 
 | |
|       commonHttpConfig = ''
 | |
|         log_format json_combined escape=json
 | |
|         '{'
 | |
|             '"remote_addr":"$remote_addr",'
 | |
|             '"method":"$request_method",'
 | |
|             '"host":"$host",'
 | |
|             '"uri":"$request_uri",'
 | |
|             '"status":$status,'
 | |
|             '"request_size":$request_length,'
 | |
|             '"response_size":$body_bytes_sent,'
 | |
|             '"response_time":$request_time,'
 | |
|             '"referrer":"$http_referer",'
 | |
|             '"user_agent":"$http_user_agent"'
 | |
|         '}';
 | |
| 
 | |
|         access_log syslog:server=unix:/dev/log,nohostname json_combined;
 | |
|       '';
 | |
| 
 | |
|       appendHttpConfig = ''
 | |
|         add_header Permissions-Policy "interest-cohort=()";
 | |
|       '';
 | |
|     };
 | |
|   };
 | |
| }
 |