working?
This commit is contained in:
parent
329af6f8c6
commit
fe10584683
1 changed files with 38 additions and 3 deletions
|
|
@ -30,9 +30,44 @@
|
||||||
|
|
||||||
boot.kernelModules = [ "kvm-intel" "kvm-amd" ];
|
boot.kernelModules = [ "kvm-intel" "kvm-amd" ];
|
||||||
|
|
||||||
|
# Enable network-online.target
|
||||||
|
systemd.services.network-online = {
|
||||||
|
enable = true;
|
||||||
|
wantedBy = [ "network.target" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Configure networkd-wait-online
|
||||||
|
systemd.network.networkd-wait-online = {
|
||||||
|
enable = true;
|
||||||
|
requiredFor = [ "br0" ];
|
||||||
|
timeout = 30;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Define the bridge
|
||||||
|
networking = {
|
||||||
|
bridges.br0 = {
|
||||||
|
interfaces = [ "eth0" "wlan0" ]; # Adjust as needed
|
||||||
|
useDHCP = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Tie services to network-online.target
|
||||||
|
systemd.services.libvirtd = {
|
||||||
|
after = [ "network-online.target" ];
|
||||||
|
wants = [ "network-online.target" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Optional: Add a debug hook
|
||||||
|
systemd.services.network-debug = {
|
||||||
|
description = "Log network status";
|
||||||
|
serviceConfig = {
|
||||||
|
ExecStart = "/bin/bash -c 'ip a && journalctl -u network.target'";
|
||||||
|
Type = "oneshot";
|
||||||
|
};
|
||||||
|
wantedBy = [ "network-online.target" ];
|
||||||
|
};
|
||||||
|
|
||||||
virtualisation.libvirtd.allowedBridges =
|
virtualisation.libvirtd.allowedBridges =
|
||||||
[ "br0" ];
|
[ "br0" ];
|
||||||
|
|
||||||
networking.interfaces.br0.useDHCP = true;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue