{ pkgs
, lib
, config
, ... }: with lib; mkIf config.passthrough.gui {
  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";
  };
}
