Configure Windows VM
This commit is contained in:
parent
b108f84b8b
commit
6318113c76
|
@ -0,0 +1,39 @@
|
|||
{ pkgs, lib, ... }:
|
||||
{
|
||||
boot = {
|
||||
initrd.kernelModules = [
|
||||
"vfio_pci"
|
||||
"vfio"
|
||||
"vfio_iommu_type1"
|
||||
|
||||
"amdgpu"
|
||||
];
|
||||
|
||||
kernelParams =
|
||||
let
|
||||
gpuIDs = [
|
||||
"1002:67df" # Graphics
|
||||
"1002:aaf0" # Audio
|
||||
];
|
||||
in
|
||||
[
|
||||
# enable IOMMU
|
||||
"amd_iommu=on"
|
||||
("vfio-pci.ids=" + lib.concatStringsSep "," gpuIDs)
|
||||
];
|
||||
};
|
||||
|
||||
hardware.opengl.enable = true;
|
||||
virtualisation.spiceUSBRedirection.enable = true;
|
||||
services.openssh.settings.X11Forwarding = true;
|
||||
|
||||
# Virtualization
|
||||
virtualisation.libvirtd = {
|
||||
enable = true;
|
||||
onBoot = "start";
|
||||
onShutdown = "shutdown";
|
||||
};
|
||||
|
||||
programs.virt-manager.enable = true;
|
||||
users.users.agatha.extraGroups = [ "libvirtd" ];
|
||||
}
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
../../common/fragments/graphical
|
||||
../../common/fragments/yubikey.nix
|
||||
../../common/fragments/graphical/barebones.nix
|
||||
../../common/fragments/virt.nix
|
||||
../../common/home_manager/common.nix
|
||||
];
|
||||
|
||||
|
|
Loading…
Reference in New Issue