diff --git a/ops/nixos/ixvm-fra01/bird.nix b/ops/nixos/ixvm-fra01/bird.nix index c878bcd351..1afd29cabe 100644 --- a/ops/nixos/ixvm-fra01/bird.nix +++ b/ops/nixos/ixvm-fra01/bird.nix @@ -81,8 +81,10 @@ let ipv4 table ${ixName}4; ipv6 table ${ixName}6; '' + lib.concatImapStringsSep "\n" ( i: v: generateSnippetForRouter (args // { routerNum = i; router = v; }) ) ix.remote.routers; + enabledSnippet = { enabled ? true, ... }: "disabled ${if enabled then "off" else "on"};"; generateSnippetForRouter = { ixName, ix, routerNum, router, ... }: '' protocol bgp ${ixName}${toString routerNum}_4 { + ${enabledSnippet router}; local ${ix.local.v4} as ${toString ix.local.asn}; neighbor ${router.v4} as ${toString ix.remote.asn}; ipv4 { @@ -92,6 +94,7 @@ let }; }; protocol bgp ${ixName}${toString routerNum}_6 { + ${enabledSnippet router}; local ${ix.local.v6} as ${toString ix.local.asn}; neighbor ${router.v6} as ${toString ix.remote.asn}; ipv6 {