add work host
This commit is contained in:
parent
0742e53e45
commit
d390530b35
6 changed files with 411 additions and 0 deletions
26
modules/_hardware/work-hardware.nix
Normal file
26
modules/_hardware/work-hardware.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ config, lib, modulesPath, ... }: {
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
# AMD Ryzen 7 4000 series (Renoir)
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "sd_mod" ];
|
||||
boot.kernelModules = [ "kvm-amd" "amdgpu" ];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
|
||||
hardware.cpu.amd.updateMicrocode =
|
||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
|
||||
# PRIME offload: AMD iGPU renders the display, NVIDIA dGPU handles offloaded workloads.
|
||||
# Fill in the Bus IDs before building the ISO.
|
||||
# To get them: boot any live Linux on the machine and run:
|
||||
# lspci -D | grep -E '(VGA|3D|Display)'
|
||||
# Then convert the PCI address (e.g. 0000:06:00.0) to the format "PCI:6:0:0".
|
||||
hardware.nvidia.prime = {
|
||||
offload.enable = true;
|
||||
offload.enableOffloadCmd = true;
|
||||
amdgpuBusId = "PCI:FILL:IN:ME"; # TODO: AMD Radeon Vega iGPU bus ID
|
||||
nvidiaBusId = "PCI:FILL:IN:ME"; # TODO: NVIDIA GTX 1650 dGPU bus ID
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue