blob: a9eaef4ff51e5b774458d81d5439c7a2bd164d5f (
plain) (
tree)
|
|
{
config,
options,
lib,
pkgs,
...
}: let
virtConfig = config.modules.desktop.apps.virt-manager;
in
{
options.modules.desktop.apps.virt-manager = {
enable = lib.mkOption {
type = lib.types.bool;
default = false;
};
};
config = lib.mkIf (virtConfig.enable) {
home.packages = [
pkgs.virtiofsd
];
virtualisation.libvirtd = {
enable = true;
qemu = {
package = pkgs.qemu_kvm;
runAsRoot = true;
swtpm.enable = true;
ovmf = {
enable = true;
packages = [(pkgs.OVMF.override {
secureBoot = true;
tpmSupport = true;
}).fd];
};
};
};
programs.virt-manager.enable = true;
home.manager.dconf.settings = {
"org/virt-manager/virt-manager/connections" = {
autoconnect = ["qemu:///system"];
uris = ["qemu:///system"];
};
};
user.extraGroups = ["libvirtd"];
};
}
|