2025-01-11 15:25:39 +01:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
cfg = config.modules.system.apps.qemu;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options.modules.system.apps.qemu = {
|
|
|
|
enable = mkEnableOption ''
|
|
|
|
Enable qemu with my custom configurations
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
programs.virt-manager.enable = true;
|
|
|
|
|
|
|
|
users.groups.libvirtd.members = ["florian"];
|
|
|
|
users.users.florian.extraGroups = [ "libvirtd" ];
|
|
|
|
|
2025-02-01 14:13:45 +01:00
|
|
|
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];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2025-01-11 15:25:39 +01:00
|
|
|
|
|
|
|
virtualisation.spiceUSBRedirection.enable = true;
|
|
|
|
};
|
|
|
|
}
|