NixOS-Config/system/services/virtualization/qemu/default.nix

40 lines
764 B
Nix
Raw Normal View History

{ config, pkgs, ... }: {
2024-08-24 22:16:51 -04:00
virtualisation = {
libvirtd = {
enable = true;
onBoot = "ignore";
onShutdown = "shutdown";
qemu = {
ovmf = {
enable = true;
2024-09-21 18:56:25 -04:00
packages = [
pkgs.OVMFFull.fd
pkgs.pkgsCross.aarch64-multiplatform.OVMF.fd
];
2024-08-24 22:16:51 -04:00
};
swtpm.enable = true;
};
};
spiceUSBRedirection.enable = true;
};
environment.systemPackages = with pkgs; [
virt-manager
virtiofsd
dnsmasq
spice-vdagent
looking-glass-client
];
2024-09-28 03:32:06 -04:00
# Needed to make NAT work
networking.firewall.trustedInterfaces = [
2024-09-28 03:32:34 -04:00
"virbr0"
"virbr1"
2024-09-28 03:32:06 -04:00
];
2024-08-24 22:16:51 -04:00
# Allow Looking-Glass permissions
systemd.tmpfiles.rules = [
"f /dev/shm/looking-glass 0660 jimbo libvirtd -"
];
}