mirror of
https://github.com/oqyude/nixos.git
synced 2026-06-11 12:40:44 +03:00
so mad
This commit is contained in:
Executable
+52
@@ -0,0 +1,52 @@
|
||||
{ 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
|
||||
];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user