working bridge configuration

This commit is contained in:
2025-07-25 16:55:32 +02:00
parent e2290b064e
commit 128e3b0dc1
2 changed files with 8 additions and 2 deletions

View File

@@ -48,7 +48,7 @@
# (the default) this is the recommended approach. When using systemd-networkd it's # (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction # still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true; # networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp4s0.useDHCP = lib.mkDefault true; # networking.interfaces.enp4s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";

View File

@@ -4,9 +4,15 @@
"enp4s0" "enp4s0"
]; ];
boot.kernel.sysctl."net.ipv4.ip_forward" = 1;
networking.interfaces.virtbr0 = { networking.interfaces.virtbr0 = {
useDHCP = true; useDHCP = true;
}; };
virtualisation.libvirtd.allowedBridges = [ "virtbr0" ]; virtualisation.libvirtd = {
enable = true;
allowedBridges = [ "virtbr0" ];
};
} }