From ac7d5e1c484340dba181dacb24b068dfdef46246 Mon Sep 17 00:00:00 2001 From: Peritia Date: Wed, 1 Oct 2025 12:33:37 +0200 Subject: [PATCH] fix: VM Module --- Modules/System/Application/cli/vm.nix | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/Modules/System/Application/cli/vm.nix b/Modules/System/Application/cli/vm.nix index 3b150f7..6167d58 100644 --- a/Modules/System/Application/cli/vm.nix +++ b/Modules/System/Application/cli/vm.nix @@ -15,6 +15,7 @@ # - virt-manager GUI is enabled automatically # - Only generic "kvm" kernel module is forced (host picks intel/amd) # + { config, lib, @@ -35,27 +36,25 @@ in { config = lib.mkIf cfg.enable { environment.systemPackages = with pkgs; [ - virt-manager + virtio-win spice-gtk dnsmasq bridge-utils ]; + services.qemuGuest.enable = true; + services.spice-vdagentd.enable = true; + virtualisation.spiceUSBRedirection.enable = true; + virtualisation.libvirtd = { enable = true; - qemu = { - package = pkgs.qemu_full; - runAsRoot = true; - }; + qemu.runAsRoot = true; }; - # Add user to groups - users.users.${cfg.username}.extraGroups = ["libvirtd" "kvm"]; + users.groups.libvirtd.members = [cfg.username]; + users.groups.kvm.members = [cfg.username]; - # Enable kernel modules for virtualization boot.kernelModules = ["kvm"]; - - # Enable GUI management tool programs.virt-manager.enable = true; assertions = [