working bridge configuration
This commit is contained in:
@@ -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";
|
||||||
|
|||||||
@@ -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" ];
|
||||||
|
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user