{ config, lib, ... }:
let
    hasGui = config.services.dbus.implementation == "dbus";
in
{
    config = lib.mkIf hasGui
    {
        programs.virt-manager.enable = true;
        virtualisation.libvirtd.enable = true;
    };
}