nixcfg/hosts/focalor/vfio.nix
2025-06-15 05:35:32 -04:00

26 lines
No EOL
586 B
Nix
Executable file

{ config, lib, system, pkgs, modulesPath, inputs, ... }:
{
programs.virt-manager.enable = true;
virtualisation.spiceUSBRedirection.enable = true;
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];
};
};
hooks.qemu = {
end = "./scripts/end.sh";
};
};
users.extraUsers.regent.extraGroups = [ "libvirtd" ];
}