From 91d9837a18303b303a2e57da295ec4bbcd182986 Mon Sep 17 00:00:00 2001 From: sinavir Date: Tue, 19 Nov 2024 12:38:14 +0100 Subject: [PATCH] chore(router02/networking): Update routes syntax --- machines/router02/networking.nix | 66 ++++++++++++-------------------- 1 file changed, 24 insertions(+), 42 deletions(-) diff --git a/machines/router02/networking.nix b/machines/router02/networking.nix index 2f68051..3979c07 100644 --- a/machines/router02/networking.nix +++ b/machines/router02/networking.nix @@ -40,18 +40,14 @@ }; routes = [ { - routeConfig = { - Destination = "::/0"; - Table = "he"; - Scope = "global"; - }; + Destination = "::/0"; + Table = "he"; + Scope = "global"; } { # Use HE tunnel for router trafic as well - routeConfig = { - Destination = "::/0"; - Scope = "global"; - }; + Destination = "::/0"; + Scope = "global"; } ]; routingPolicyRules = [ @@ -82,41 +78,31 @@ }; routes = [ { - routeConfig = { - Gateway = "2a0b:cbc0:1::215"; - PreferredSource = "2a0e:e701:1120::1"; - }; + Gateway = "2a0b:cbc0:1::215"; + PreferredSource = "2a0e:e701:1120::1"; } { # Local route - routeConfig = { - Table = "mwan"; - Destination = "2a0e:e701:1120::/64"; - }; + Table = "mwan"; + Destination = "2a0e:e701:1120::/64"; } { # Default unreachable route for unattributed prefixes of our /48 - routeConfig = { - Table = "mwan"; - Metric = 9999; - Destination = "2a0e:e701:1120::/48"; - Type = "unreachable"; - }; + Table = "mwan"; + Metric = 9999; + Destination = "2a0e:e701:1120::/48"; + Type = "unreachable"; } { - routeConfig = { - Table = "mwan"; - Gateway = "2a0b:cbc0:1::215"; - PreferredSource = "2a0e:e701:1120::1"; - }; + Table = "mwan"; + Gateway = "2a0b:cbc0:1::215"; + PreferredSource = "2a0e:e701:1120::1"; } # IPv4 { - routeConfig = { - Scope = "global"; - Table = "mwan"; - Gateway = "10.1.1.49"; - }; + Scope = "global"; + Table = "mwan"; + Gateway = "10.1.1.49"; } ]; routingPolicyRules = [ @@ -165,10 +151,8 @@ ]; routes = [ { - routeConfig = { - Table = "mwan"; - Destination = "2a0e:e701:1120:1000::/64"; - }; + Table = "mwan"; + Destination = "2a0e:e701:1120:1000::/64"; } ]; }; @@ -188,11 +172,9 @@ ]; routes = [ { - routeConfig = { - Table = "he"; - Scope = "global"; - Destination = "2001:470:1f13:187::/64"; - }; + Table = "he"; + Scope = "global"; + Destination = "2001:470:1f13:187::/64"; } ]; };