{ config, lib, pkgs, ... }: { dconf.settings = { "org/virt-manager/virt-manager/connections" = { autoconnect = ["qemu:///system"]; uris = ["qemu:///system"]; }; }; xdg.desktopEntries = { win10 = { name = "Win 10 VM"; type = "Application"; icon = "windows"; comment = "start the win10 vm"; exec = pkgs.lib.strings.concatStrings [ "bash -c \"" "virsh --connect=qemu:///system start win10; " "virt-viewer -a -w -c qemu:///system win10 " "&& virsh --connect=qemu:///system managedsave win10\"" ]; }; win11 = { name = "Win 11 VM"; type = "Application"; icon = "windows"; comment = "start the win11 vm"; exec = pkgs.lib.strings.concatStrings [ "bash -c \"" "virsh --connect=qemu:///system start win11; " "virsh --connect=qemu:///system resume win11; " "virt-viewer -a -w -c qemu:///system win11 " "&& virsh --connect=qemu:///system managedsave win11\"" ]; }; }; }