mirror of
https://github.com/oqyude/nixos.git
synced 2026-06-10 20:20:41 +03:00
53 lines
892 B
Nix
Executable File
53 lines
892 B
Nix
Executable File
{ inputs, ... }@flakeContext:
|
|
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
{
|
|
boot = {
|
|
kernelModules = [
|
|
"kvm-amd"
|
|
"vfio"
|
|
"vfio-pci"
|
|
"vfio_iommu_type1"
|
|
"vfio_virqfd"
|
|
];
|
|
kernelParams = [
|
|
"amd_iommu=on"
|
|
"iommu=pt"
|
|
"kvm.ignore_msrs=1"
|
|
];
|
|
};
|
|
services = {
|
|
spice-vdagentd.enable = true;
|
|
};
|
|
virtualisation = {
|
|
libvirtd = {
|
|
enable = true;
|
|
onBoot = "ignore";
|
|
onShutdown = "shutdown";
|
|
qemu = {
|
|
swtpm.enable = true;
|
|
ovmf.enable = true;
|
|
ovmf.packages = [ pkgs.OVMFFull.fd ];
|
|
};
|
|
};
|
|
spiceUSBRedirection.enable = true;
|
|
};
|
|
environment = {
|
|
systemPackages = with pkgs; [
|
|
spice
|
|
#spice-gtk
|
|
#spice-protocol
|
|
virt-manager
|
|
virt-viewer
|
|
virtiofsd
|
|
win-spice
|
|
virtio-win
|
|
#looking-glass-client # pci-passthrough
|
|
];
|
|
};
|
|
}
|