2 with (import ./names-and-numbers.nix);
4 networking.interfaces = {
7 ipv4.addresses = [{ address = "${eth1IPv4}.1"; prefixLength = 24; }];
11 ipv4.addresses = [{ address = "${eth2IPv4}.1"; prefixLength = 24; }];
15 ipv4.addresses = [{ address = "${eth3IPv4}.1"; prefixLength = 24; }];
18 networking.networkmanager = {
26 networking.nftables.ruleset = lib.mkAfter ''
29 iifname { ${eth1Iface}, ${eth2Iface}, ${eth3Iface} } jump input-lan
30 iifname { ${eth1Iface}, ${eth2Iface}, ${eth3Iface} } log level warn prefix "input-lan: " counter drop
33 oifname { ${eth1Iface}, ${eth2Iface}, ${eth3Iface} } jump output-lan
34 oifname { ${eth1Iface}, ${eth2Iface}, ${eth3Iface} } log level warn prefix "output-lan: " counter drop
39 systemd.services.dhcpd4.onFailure = [
40 "network-addresses-${eth1Iface}.service"
41 "network-addresses-${eth2Iface}.service"
42 "network-addresses-${eth3Iface}.service"
52 subnet ${eth1IPv4}.0 netmask 255.255.255.0 {
53 range ${eth1IPv4}.100 ${eth1IPv4}.200;
54 option broadcast-address ${eth1IPv4}.255;
55 option domain-name-servers ${eth1IPv4}.1;
56 option routers ${eth1IPv4}.1;
57 option subnet-mask 255.255.255.0;
60 subnet ${eth2IPv4}.0 netmask 255.255.255.0 {
61 range ${eth2IPv4}.100 ${eth2IPv4}.200;
62 option broadcast-address ${eth2IPv4}.255;
63 option domain-name-servers ${eth2IPv4}.1;
64 option routers ${eth2IPv4}.1;
65 option subnet-mask 255.255.255.0;
68 subnet ${eth3IPv4}.0 netmask 255.255.255.0 {
69 range ${eth3IPv4}.100 ${eth3IPv4}.200;
70 option broadcast-address ${eth3IPv4}.255;
71 option domain-name-servers ${eth3IPv4}.1;
72 option routers ${eth3IPv4}.1;
73 option subnet-mask 255.255.255.0;