From 6b0bc35f83a14ee9f9a34e1af782f1ef4c363d6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Wed, 17 Jan 2024 19:13:22 +0100 Subject: nixos/router: rework router to use networkd --- nixos/machine/adm-omnia.nix | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'nixos/machine') diff --git a/nixos/machine/adm-omnia.nix b/nixos/machine/adm-omnia.nix index 437831b..fd6d654 100644 --- a/nixos/machine/adm-omnia.nix +++ b/nixos/machine/adm-omnia.nix @@ -40,9 +40,21 @@ with lib; { }; #systemd.services."pppd-wan".after = ["sys-subsystem-net-devices-end2.device"]; - networking.bridges = { - brlan.interfaces = ["lan1" "lan2" "lan3" "lan4"]; - brguest.interfaces = ["lan0"]; + environment.systemPackages = [pkgs.tcpdump]; + + networking = { + useNetworkd = true; + useDHCP = false; + }; + systemd.network.networks = { + "lan-brlan" = { + matchConfig.Name = "lan[1-4]"; + networkConfig.Bridge = "brlan"; + }; + "lan0-brguest" = { + matchConfig.Name = "lan0"; + networkConfig.Bridge = "brguest"; + }; }; }; } -- cgit v1.2.3