diff --git a/hosts/containers/freifunk/default.nix b/hosts/containers/freifunk/default.nix index 7a218f19..3b6bf919 100644 --- a/hosts/containers/freifunk/default.nix +++ b/hosts/containers/freifunk/default.nix @@ -21,6 +21,11 @@ let rt_table_upstream = 100; node51001AddrPart = "200.2"; + + mac = { + core = "00:de:13:cb:9a:7b"; + bmx = "00:de:13:cb:9a:7c"; + }; in { imports = [ "${modulesPath}/profiles/minimal.nix" @@ -46,8 +51,12 @@ in { interfaces = [ { type = "tap"; - id = "freifunk"; - mac = "00:de:13:cb:9a:7b"; + id = "freifunk-core"; + mac = mac.core; + } { + type = "tap"; + id = "freifunk-bmx"; + mac = mac.bmx; } ]; }; @@ -157,11 +166,19 @@ in { }; }; }; + links = { + # Wired mesh interface + "10-bmx" = { + enable = true; + matchConfig = { MACAddress = mac.bmx; }; + linkConfig.Name = meshInterface; + }; + }; networks = { # Wired mesh interface "10-bmx" = { enable = true; - matchConfig = { Name = meshInterface; }; + matchConfig = { MACAddress = mac.bmx; }; addresses = [{ addressConfig = { Address = "10.201.${ddmeshAddrPart}/16"; @@ -199,7 +216,7 @@ in { # ZW "20-core" = { enable = true; - matchConfig = { Name = "core"; }; + matchConfig = { MACAddress = mac.core; }; addresses = map (Address: { addressConfig = { inherit Address; }; }) ( [ "${coreAddress}/${toString core.subnet4Len}" diff --git a/hosts/server10/microvms.nix b/hosts/server10/microvms.nix index a3a006ff..490aa3de 100644 --- a/hosts/server10/microvms.nix +++ b/hosts/server10/microvms.nix @@ -2,7 +2,8 @@ microvm.autostart = [ "oparl" "leon" "nfsroot" ]; c3d2.server.bridgePorts = { serv = [ "oparl" "leon" "nfsroot" ]; - core = [ "freifunk" ]; + core = [ "freifunk-core" ]; + bmx = [ "freifunk-bmx" ]; }; nix = {