freifunk: fix network config
This commit is contained in:
parent
b20949080d
commit
6e50d39cbe
|
@ -21,6 +21,11 @@ let
|
||||||
rt_table_upstream = 100;
|
rt_table_upstream = 100;
|
||||||
|
|
||||||
node51001AddrPart = "200.2";
|
node51001AddrPart = "200.2";
|
||||||
|
|
||||||
|
mac = {
|
||||||
|
core = "00:de:13:cb:9a:7b";
|
||||||
|
bmx = "00:de:13:cb:9a:7c";
|
||||||
|
};
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
"${modulesPath}/profiles/minimal.nix"
|
"${modulesPath}/profiles/minimal.nix"
|
||||||
|
@ -46,8 +51,12 @@ in {
|
||||||
|
|
||||||
interfaces = [ {
|
interfaces = [ {
|
||||||
type = "tap";
|
type = "tap";
|
||||||
id = "freifunk";
|
id = "freifunk-core";
|
||||||
mac = "00:de:13:cb:9a:7b";
|
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 = {
|
networks = {
|
||||||
# Wired mesh interface
|
# Wired mesh interface
|
||||||
"10-bmx" = {
|
"10-bmx" = {
|
||||||
enable = true;
|
enable = true;
|
||||||
matchConfig = { Name = meshInterface; };
|
matchConfig = { MACAddress = mac.bmx; };
|
||||||
addresses = [{
|
addresses = [{
|
||||||
addressConfig = {
|
addressConfig = {
|
||||||
Address = "10.201.${ddmeshAddrPart}/16";
|
Address = "10.201.${ddmeshAddrPart}/16";
|
||||||
|
@ -199,7 +216,7 @@ in {
|
||||||
# ZW
|
# ZW
|
||||||
"20-core" = {
|
"20-core" = {
|
||||||
enable = true;
|
enable = true;
|
||||||
matchConfig = { Name = "core"; };
|
matchConfig = { MACAddress = mac.core; };
|
||||||
addresses = map (Address: { addressConfig = { inherit Address; }; }) (
|
addresses = map (Address: { addressConfig = { inherit Address; }; }) (
|
||||||
[
|
[
|
||||||
"${coreAddress}/${toString core.subnet4Len}"
|
"${coreAddress}/${toString core.subnet4Len}"
|
||||||
|
|
|
@ -2,7 +2,8 @@
|
||||||
microvm.autostart = [ "oparl" "leon" "nfsroot" ];
|
microvm.autostart = [ "oparl" "leon" "nfsroot" ];
|
||||||
c3d2.server.bridgePorts = {
|
c3d2.server.bridgePorts = {
|
||||||
serv = [ "oparl" "leon" "nfsroot" ];
|
serv = [ "oparl" "leon" "nfsroot" ];
|
||||||
core = [ "freifunk" ];
|
core = [ "freifunk-core" ];
|
||||||
|
bmx = [ "freifunk-bmx" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user