This commit is contained in:
unexplrd
2025-02-06 00:33:06 +02:00
commit 2e6e28ef32
254 changed files with 28562 additions and 0 deletions

View File

@ -0,0 +1,35 @@
{
pkgs,
config,
lib,
...
}:
with lib; let
cfg = config.virtual.libvirt;
in {
options = {
virtual.libvirt.enable =
mkEnableOption "enables virtualisation";
};
config = mkIf cfg.enable {
virtualisation.libvirtd = {
enable = true;
qemu = {
package = pkgs.qemu_kvm;
runAsRoot = false;
swtpm.enable = true;
vhostUserPackages = [pkgs.virtiofsd];
ovmf = {
enable = true;
packages = [
(pkgs.OVMF.override {
secureBoot = true;
tpmSupport = true;
})
.fd
];
};
};
};
};
}