mirror of
https://github.com/blahai/nyx.git
synced 2025-01-18 19:10:21 +00:00
35 lines
692 B
Nix
35 lines
692 B
Nix
|
{ pkgs, lib, config, ... }:
|
||
|
let
|
||
|
platform = "amd";
|
||
|
vfioIds = [ "" "" ];
|
||
|
in {
|
||
|
boot = {
|
||
|
kernelModules = [ "kvm-${platform}" "vfio_virqfd" "vfio_pci" "vfio_iommu_type1" "vfio" ];
|
||
|
kernelParams = [ "${platform}_iommu=on" "${platform}_iommu=pt" "kvm.ignore_msrs=1" ];
|
||
|
extraModprobeConfig = "options vfio-pci ids=${builtins.concatStringsSep "," vfioIds}";
|
||
|
};
|
||
|
|
||
|
virtualisation = {
|
||
|
libvirtd = {
|
||
|
enable = true;
|
||
|
onBoot = "ignore";
|
||
|
onShutdown = "shutdown";
|
||
|
};
|
||
|
|
||
|
qemu = {
|
||
|
package = pkgs.qemu_kvm;
|
||
|
ovmf.enable = true;
|
||
|
};
|
||
|
|
||
|
docker = {
|
||
|
enable = true;
|
||
|
};
|
||
|
};
|
||
|
|
||
|
environment.systemPackages = with pkgs; [
|
||
|
virt-manager
|
||
|
];
|
||
|
|
||
|
|
||
|
}
|