diff --git a/nixos/boxes/home/routing-common/dns.nix b/nixos/boxes/home/routing-common/dns.nix index 84b1a3e..ff98614 100644 --- a/nixos/boxes/home/routing-common/dns.nix +++ b/nixos/boxes/home/routing-common/dns.nix @@ -170,8 +170,8 @@ in hostname = "${otherName}.${config.networking.domain}"; server = net.cidr.host (otherIndex + 1) prefixes.hi.v4; }} - ${elemAt routers 0} IN AAAA ${net.cidr.host 1 prefixes.hi.v6} - ${elemAt routers 1} IN AAAA ${net.cidr.host 2 prefixes.hi.v6} + ${elemAt routers 0} IN AAAA ${allAssignments."${elemAt routers 0}".as211024.ipv6.address} + ${elemAt routers 1} IN AAAA ${allAssignments."${elemAt routers 1}".as211024.ipv6.address} boot IN CNAME river-hi.${config.networking.domain}. @ IN NS ns1 diff --git a/nixos/boxes/home/routing-common/keepalived.nix b/nixos/boxes/home/routing-common/keepalived.nix index e1c4370..7c89804 100644 --- a/nixos/boxes/home/routing-common/keepalived.nix +++ b/nixos/boxes/home/routing-common/keepalived.nix @@ -61,7 +61,12 @@ in v6Alive = pingScriptFor "v6" [ "2606:4700:4700::1111" "2001:4860:4860::8888" "2600::" ]; }; vrrpInstances = { - v4 = mkVRRP "v4" 51; + v4 = mkVRRP "v4" 51 // { + extraConfig = '' + notify_master "${config.systemd.package}/bin/systemctl start tailscaled.service" root + notify_backup "${config.systemd.package}/bin/systemctl stop tailscaled.service" root + ''; + }; v6 = (mkVRRP "v6" 52) // { extraConfig = '' notify_master "${config.systemd.package}/bin/systemctl start radvd.service" root