From b51736d20afa6c5ec3195611ecda5f4c3ff76093 Mon Sep 17 00:00:00 2001 From: ulic-youthlic Date: Fri, 22 May 2026 14:48:14 +0800 Subject: [PATCH] feat: make qemu be able to bridge network by adding br0 --- nixos/configurations/Tytonidae/networking.nix | 42 ++++++++++++------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/nixos/configurations/Tytonidae/networking.nix b/nixos/configurations/Tytonidae/networking.nix index a25c986..d7bc856 100644 --- a/nixos/configurations/Tytonidae/networking.nix +++ b/nixos/configurations/Tytonidae/networking.nix @@ -20,21 +20,27 @@ }; }; }; - # netdevs = { - # "20-bond0" = { - # netdevConfig = { - # Kind = "bond"; - # Name = "bond0"; - # }; - # bondConfig = { - # Mode = "balance-alb"; - # MIIMonitorSec = "1s"; - # PrimaryReselectPolicy = "better"; - # }; - # }; - # }; + netdevs = { + # "20-bond0" = { + # netdevConfig = { + # Kind = "bond"; + # Name = "bond0"; + # }; + # bondConfig = { + # Mode = "balance-alb"; + # MIIMonitorSec = "1s"; + # PrimaryReselectPolicy = "better"; + # }; + # }; + "20-br0" = { + netdevConfig = { + Kind = "bridge"; + Name = "br0"; + }; + }; + }; networks = { - "20-eno2" = { + "20-br0" = { networkConfig = { # Bond = "bond0"; # PrimarySlave = true; @@ -48,9 +54,17 @@ linkConfig = { RequiredForOnline = "routable"; }; + matchConfig = { + Name = "br0"; + }; + }; + "20-eno2" = { matchConfig = { Name = "eno2"; }; + networkConfig = { + Bridge = "br0"; + }; }; # "20-wlan0" = { # matchConfig = {