diff --git a/desktop/virtualization.nix b/desktop/virtualization.nix index 06e8da4..f31561e 100755 --- a/desktop/virtualization.nix +++ b/desktop/virtualization.nix @@ -24,11 +24,9 @@ spicy ]; - users.extraGroups.vboxusers.members = [ "jsutter" ]; - environment.sessionVariables.LIBVIRT_DEFAULT_URI = [ "qemu:///system" ]; - boot.kernelModules = [ "kvm-intel" "kvm-amd" ]; + boot.kernelModules = [ "bridge" ]; # Enable network-online.target systemd.services.network-online = { @@ -36,21 +34,6 @@ 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" ]; @@ -58,14 +41,15 @@ }; # 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" ]; +systemd.services.network-debug = { + description = "Log network status"; + serviceConfig = { + # Use bash and provide full paths for commands + ExecStart = "${pkgs.bash}/bin/bash -c '${pkgs.iproute2}/bin/ip a && journalctl -u network.target'"; + Type = "oneshot"; }; + wantedBy = [ "network-online.target" ]; +}; virtualisation.libvirtd.allowedBridges = [ "br0" ]; diff --git a/flake.nix b/flake.nix index 01545a2..0714e47 100755 --- a/flake.nix +++ b/flake.nix @@ -24,6 +24,7 @@ ./desktop/dev.nix ./desktop/office.nix ./desktop/gaming.nix + ./desktop/virtualization.nix ]; }; aurora = nixpkgs.lib.nixosSystem { diff --git a/systems/aurora.nix b/systems/aurora.nix index a5b21de..c5ecfa9 100755 --- a/systems/aurora.nix +++ b/systems/aurora.nix @@ -29,7 +29,7 @@ networking.bridges = { "br0" = { - interfaces = [ "eth0" ]; + interfaces = [ "eth0" "wlan0" ]; }; }; } diff --git a/systems/framework.nix b/systems/framework.nix index f54c064..919ad64 100755 --- a/systems/framework.nix +++ b/systems/framework.nix @@ -72,7 +72,6 @@ ]; services.udev.packages = [ pkgs.via ]; - networking.bridges = { "br0" = { interfaces = [ "wlan0" ];