freifunk: name more bmx tables

This commit is contained in:
Astro 2021-04-29 22:55:31 +02:00
parent 8b0fb87025
commit 08b35d6f51
1 changed files with 9 additions and 3 deletions

View File

@ -9,7 +9,9 @@ let
ddmeshRegisterKey = pkgs.c3d2-freifunk.ddmeshRegisterKey;
ddmeshNode = 51073;
ddmeshAddrPart = "200.74";
rt_table = 7;
rt_table_hosts = 7;
rt_table_nets = rt_table_hosts + 1;
rt_table_tuns = rt_table_hosts + 2;
sysinfo-json = import ./sysinfo-json.nix { inherit pkgs ddmeshNode; };
in {
imports = [
@ -62,7 +64,11 @@ in {
# Configure rt_table name
networking.iproute2 = {
enable = true;
rttablesExtraConfig = "${toString rt_table} bmx";
rttablesExtraConfig = ''
${toString rt_table_hosts} bmx_hosts
${toString rt_table_nets} bmx_nets
${toString rt_table_tuns} bmx_tuns
'';
};
# Required for krops: ssh git
@ -128,7 +134,7 @@ in {
serviceConfig = {
ExecStart = ''
${pkgs.bmxd}/sbin/bmxd \
--rt_table_offset=${toString rt_table} \
--rt_table_offset=${toString rt_table_hosts} \
--no_fork 1 \
--throw-rules 0 \
--prio-rules 0 \