at master 752 B view raw
1{ ... }: 2{ 3 name = "bind"; 4 5 nodes.machine = 6 { pkgs, lib, ... }: 7 { 8 services.bind.enable = true; 9 services.bind.extraOptions = "empty-zones-enable no;"; 10 services.bind.zones = lib.singleton { 11 name = "."; 12 master = true; 13 file = pkgs.writeText "root.zone" '' 14 $TTL 3600 15 . IN SOA ns.example.org. admin.example.org. ( 1 3h 1h 1w 1d ) 16 . IN NS ns.example.org. 17 18 ns.example.org. IN A 192.168.0.1 19 ns.example.org. IN AAAA abcd::1 20 21 1.0.168.192.in-addr.arpa IN PTR ns.example.org. 22 ''; 23 }; 24 }; 25 26 testScript = '' 27 machine.wait_for_unit("bind.service") 28 machine.succeed("host 192.168.0.1 127.0.0.1 | grep -qF ns.example.org") 29 ''; 30}