refactor(networking): split networking into modules
This commit is contained in:
		
							parent
							
								
									4a177d2122
								
							
						
					
					
						commit
						221d9e3e33
					
				
					 8 changed files with 227 additions and 30 deletions
				
			
		
							
								
								
									
										19
									
								
								system/modules/networking/firewall/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								system/modules/networking/firewall/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,19 @@ | |||
| { lib, config, ... }: | ||||
| 
 | ||||
| let | ||||
|   cfg = config.systemModules.networking; | ||||
|   inherit (lib) mkIf mkEnableOption; | ||||
| in | ||||
| 
 | ||||
| { | ||||
|   options.systemModules.networking.firewall = mkEnableOption "Enable networking firewall system modules"; | ||||
|   config = mkIf cfg.firewall { | ||||
|     networking.firewall = { | ||||
|       enable = true; | ||||
|       allowedTCPPorts = [ | ||||
|         443 # https | ||||
|         57621 # spotify | ||||
|       ]; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue