yevaud: move dns experiment to separate file
This commit is contained in:
		
							parent
							
								
									efa2ce3940
								
							
						
					
					
						commit
						61288d4675
					
				
					 2 changed files with 35 additions and 30 deletions
				
			
		|  | @ -4,6 +4,8 @@ | |||
|   imports = [ | ||||
|     ./hardware-configuration.nix | ||||
|     ./networking.nix | ||||
| 
 | ||||
|     ./experiments/birdsong-dns.nix | ||||
|   ]; | ||||
| 
 | ||||
|   nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; | ||||
|  | @ -14,36 +16,6 @@ | |||
|   users.users.qenya.extraGroups = [ "wheel" ]; | ||||
|   qenya.base-server.enable = true; | ||||
| 
 | ||||
|   services.bind = { | ||||
|     # enable = true; | ||||
|     cacheNetworks = [ "10.127.0.0/16" "fd70:81ca:0f8f::/48" ]; | ||||
|     forwarders = [ ]; | ||||
|     listenOn = [ config.birdsong.hosts.yevaud.ipv4 ]; | ||||
|     listenOnIpv6 = [ config.birdsong.hosts.yevaud.ipv6 ]; | ||||
|     zones = { | ||||
|       "birdsong.internal" = { | ||||
|         master = true; | ||||
|         # TODO: pick better email address for SOA record | ||||
|         file = pkgs.writeText "birdsong.internal.zone" '' | ||||
|           $TTL 60 | ||||
|           $ORIGIN birdsong.internal. | ||||
| 
 | ||||
|           birdsong.internal. IN SOA ns.birdsong.internal. accounts.katherina.rocks. ( 2024080401 7200 3600 1209600 3600 ) | ||||
|           birdsong.internal. IN NS ns.birdsong.internal. | ||||
| 
 | ||||
|           yevaud.c.birdsong.internal. IN A 10.127.1.1 | ||||
|           yevaud.c.birdsong.internal. IN AAAA fd70:81ca:0f8f:1::1 | ||||
| 
 | ||||
|           ns.birdsong.internal. IN A 10.127.1.1 | ||||
|           ns.birdsong.internal. IN AAAA fd70:81ca:0f8f:1::1 | ||||
|         ''; | ||||
|       }; | ||||
|     }; | ||||
|   }; | ||||
|   networking.resolvconf.useLocalResolver = false; | ||||
|   networking.firewall.allowedTCPPorts = [ 53 ]; | ||||
|   networking.firewall.allowedUDPPorts = [ 53 ]; | ||||
| 
 | ||||
|   randomcat.services.zfs.datasets = { | ||||
|     "rpool/state" = { mountpoint = "none"; }; | ||||
|     "rpool/state/forgejo" = { mountpoint = "/var/lib/forgejo"; }; | ||||
|  |  | |||
							
								
								
									
										33
									
								
								hosts/yevaud/experiments/birdsong-dns.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								hosts/yevaud/experiments/birdsong-dns.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,33 @@ | |||
| { config, lib, pkgs, ... }: | ||||
| 
 | ||||
| { | ||||
|   services.bind = { | ||||
|     # enable = true; | ||||
|     cacheNetworks = [ "10.127.0.0/16" "fd70:81ca:0f8f::/48" ]; | ||||
|     forwarders = [ ]; | ||||
|     listenOn = [ config.birdsong.hosts.yevaud.ipv4 ]; | ||||
|     listenOnIpv6 = [ config.birdsong.hosts.yevaud.ipv6 ]; | ||||
|     zones = { | ||||
|       "birdsong.internal" = { | ||||
|         master = true; | ||||
|         # TODO: pick better email address for SOA record | ||||
|         file = pkgs.writeText "birdsong.internal.zone" '' | ||||
|           $TTL 60 | ||||
|           $ORIGIN birdsong.internal. | ||||
| 
 | ||||
|           birdsong.internal. IN SOA ns.birdsong.internal. accounts.katherina.rocks. ( 2024080401 7200 3600 1209600 3600 ) | ||||
|           birdsong.internal. IN NS ns.birdsong.internal. | ||||
| 
 | ||||
|           yevaud.c.birdsong.internal. IN A 10.127.1.1 | ||||
|           yevaud.c.birdsong.internal. IN AAAA fd70:81ca:0f8f:1::1 | ||||
| 
 | ||||
|           ns.birdsong.internal. IN A 10.127.1.1 | ||||
|           ns.birdsong.internal. IN AAAA fd70:81ca:0f8f:1::1 | ||||
|         ''; | ||||
|       }; | ||||
|     }; | ||||
|   }; | ||||
|   networking.resolvconf.useLocalResolver = false; | ||||
|   networking.firewall.allowedTCPPorts = [ 53 ]; | ||||
|   networking.firewall.allowedUDPPorts = [ 53 ]; | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue