2024-01-04 13:51:17 +08:00
|
|
|
{ pkgs
|
|
|
|
, lib
|
|
|
|
, config
|
2024-01-04 14:22:27 +08:00
|
|
|
, ... }: with lib; mkIf config.passthrough.gui {
|
2024-01-04 13:51:17 +08:00
|
|
|
dconf.settings = let
|
|
|
|
p = "org/virt-manager/virt-manager";
|
|
|
|
in {
|
|
|
|
${p} = {
|
|
|
|
xmleditor-enabled = true;
|
|
|
|
# swaybar tray doesn't really work
|
|
|
|
system-tray = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
"${p}/details".show-toolbar = true;
|
|
|
|
"${p}/console" = {
|
|
|
|
scaling = 0;
|
|
|
|
auto-redirect = false;
|
|
|
|
resize-guest = 1;
|
|
|
|
};
|
|
|
|
"${p}/stats" = {
|
|
|
|
enable-memory-poll = true;
|
|
|
|
enable-disk-poll = true;
|
|
|
|
enable-net-poll = true;
|
|
|
|
};
|
|
|
|
"${p}/vmlist-fields" = {
|
|
|
|
host-cpu-usage = true;
|
|
|
|
memory-usage = true;
|
|
|
|
disk-usage = true;
|
|
|
|
network-traffic = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
"${p}/new-vm" = {
|
|
|
|
firmware = "uefi";
|
|
|
|
graphics-type = "system";
|
|
|
|
};
|
|
|
|
|
|
|
|
"${p}/confirm" = {
|
|
|
|
unapplied-dev = true;
|
|
|
|
removedev = true;
|
|
|
|
delete-storage = true;
|
|
|
|
forcepoweroff = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
"${p}/connections" = let
|
|
|
|
uri = "qemu:///system";
|
|
|
|
in {
|
|
|
|
uris = [ uri ];
|
|
|
|
autoconnect = [ uri ];
|
|
|
|
};
|
|
|
|
"${p}/conns/qemu:system".pretty-name = "KVM";
|
|
|
|
};
|
2024-01-22 11:32:00 +08:00
|
|
|
|
|
|
|
# floating other than main window
|
|
|
|
wayland.windowManager.sway.config.window.commands = [
|
|
|
|
{ criteria.app_id = "virt-manager"; command = "floating enable"; }
|
|
|
|
{ criteria.app_id = "virt-manager"; criteria.title = "Virtual Machine Manager"; command = "floating disable"; }
|
|
|
|
];
|
2024-01-04 13:51:17 +08:00
|
|
|
}
|