feat(virt-manager): add virt-manager settings

This commit is contained in:
514fpv 2024-01-04 13:51:17 +08:00
parent 4c71d6fe88
commit acb36fc3e3
Signed by: koishi
SSH key fingerprint: SHA256:axz0uIzzY+5W19i7QOUuiw5LSqhKfCBKPf3L4xFRxLw
2 changed files with 60 additions and 0 deletions

View file

@ -0,0 +1,52 @@
{ pkgs
, lib
, config
, ... }: with lib; {
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";
};
}

View file

@ -0,0 +1,8 @@
{ pkgs
, lib
, config
, ... }: with lib; let
gui = with config.faucet.gui; ( enable && session );
in mkIf gui {
programs.virt-manager.enable = true;
}