mass reformat

This commit is contained in:
notgne2 2022-10-03 17:08:32 -07:00
parent ed1c53e94c
commit 9cb456ad60
No known key found for this signature in database
GPG key ID: 5CE0A245A2DAC84A
25 changed files with 1216 additions and 1043 deletions

View file

@ -1,9 +1,15 @@
{ config, lib, pkgs, ... }:
with lib;
let cfg = config.services.ezpassthru;
{
config,
lib,
pkgs,
...
}:
with lib; let
cfg = config.services.ezpassthru;
in {
options.services.ezpassthru = {
enable = mkEnableOption
enable =
mkEnableOption
"Enable simple VM PCI passthrough config (NOTE: this is only for ppl with a primary AMD/Intel, and a non-primary NVidia)";
PCIs = mkOption {
@ -26,11 +32,11 @@ in {
"vfio"
];
boot.kernelParams = [ "intel_iommu=on" "amd_iommu=on" "pcie_aspm=off" ];
boot.kernelParams = ["intel_iommu=on" "amd_iommu=on" "pcie_aspm=off"];
boot.extraModprobeConfig = "options vfio-pci ids=${
builtins.concatStringsSep "," (builtins.attrNames cfg.PCIs)
}";
builtins.concatStringsSep "," (builtins.attrNames cfg.PCIs)
}";
boot.postBootCommands = ''
DEVS="${builtins.concatStringsSep " " (builtins.attrValues cfg.PCIs)}"