2 with (import ./names-and-numbers.nix);
3 with (import ./names-and-numbers.nix.clear);
5 systemd.services.systemd-networkd.environment.SYSTEMD_LOG_LEVEL = "debug";
6 systemd.network.enable = true;
7 systemd.network.wait-online = {
10 systemd.network.networks = {
14 Address = "${eth1IPv4}.1/24";
18 DNS = "${eth1IPv4}.1";
24 RequiredForOnline = "no";
30 Address = "${eth2IPv4}.1/24";
34 DNS = "${eth2IPv4}.1";
40 RequiredForOnline = "no";
46 Address = "${eth3IPv4}.1/24";
50 DNS = "${eth3IPv4}.1";
56 RequiredForOnline = "no";
60 networking.networkmanager = {
68 networking.nftables.ruleset = lib.mkAfter ''
71 iifname { ${eth1Iface}, ${eth2Iface}, ${eth3Iface} } jump input-lan
72 iifname { ${eth1Iface}, ${eth2Iface}, ${eth3Iface} } log level warn prefix "input-lan: " counter drop
75 oifname { ${eth1Iface}, ${eth2Iface}, ${eth3Iface} } jump output-lan
76 oifname { ${eth1Iface}, ${eth2Iface}, ${eth3Iface} } log level warn prefix "output-lan: " counter drop
78 chain forward-to-lan { }
80 iifname { ${eth1Iface}, ${eth2Iface}, ${eth3Iface} } oifname { ${eth1Iface}, ${eth2Iface}, ${eth3Iface} } goto forward-to-lan