aboutsummaryrefslogtreecommitdiff
path: root/nixos/machine
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2024-01-17 19:13:22 +0100
committerKarel Kočí <cynerd@email.cz>2024-01-17 19:18:12 +0100
commit6b0bc35f83a14ee9f9a34e1af782f1ef4c363d6e (patch)
tree5bcc1e8172213e91e15370bde0bdae1249a881ca /nixos/machine
parentcfacd69575b5888bf3e054c9f8056a19c4b5903e (diff)
downloadnixos-personal-6b0bc35f83a14ee9f9a34e1af782f1ef4c363d6e.tar.gz
nixos-personal-6b0bc35f83a14ee9f9a34e1af782f1ef4c363d6e.tar.bz2
nixos-personal-6b0bc35f83a14ee9f9a34e1af782f1ef4c363d6e.zip
nixos/router: rework router to use networkd
Diffstat (limited to 'nixos/machine')
-rw-r--r--nixos/machine/adm-omnia.nix18
1 files changed, 15 insertions, 3 deletions
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";
+ };
};
};
}