mass reformat
This commit is contained in:
parent
ed1c53e94c
commit
9cb456ad60
25 changed files with 1216 additions and 1043 deletions
|
@ -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)}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue