From bad907bf04aa66aa2ec54cb4318c764cc83b3e4b Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 22 Nov 2024 09:47:27 +0100 Subject: [PATCH] feat: add amdgpu support and update DRI_PRIME config Added `amdgpu` to the kernel modules to provide support for AMD GPUs. Updated the `DRI_PRIME` environment variable to specify the correct PCI device. --- systems/x86_64-linux/x1/default.nix | 1 + systems/x86_64-linux/x1/hardware-configuration.nix | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/systems/x86_64-linux/x1/default.nix b/systems/x86_64-linux/x1/default.nix index 497ed36..9c753d7 100644 --- a/systems/x86_64-linux/x1/default.nix +++ b/systems/x86_64-linux/x1/default.nix @@ -80,6 +80,7 @@ with lib.metacfg; LIBVA_DRIVER_NAME = "iHD"; # NIXOS_OZONE_WL = "1"; # DRI_PRIME = "pci-0000_24_00_0"; + DRI_PRIME = "pci-0000_00_02_0"; }; system.stateVersion = "23.11"; diff --git a/systems/x86_64-linux/x1/hardware-configuration.nix b/systems/x86_64-linux/x1/hardware-configuration.nix index cc39e6b..b461eaa 100644 --- a/systems/x86_64-linux/x1/hardware-configuration.nix +++ b/systems/x86_64-linux/x1/hardware-configuration.nix @@ -13,7 +13,6 @@ imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; boot.initrd.availableKernelModules = [ - "xhci_pci" "thunderbolt" "nvme" "uas" @@ -22,7 +21,7 @@ ]; boot.initrd.kernelModules = [ ]; boot.kernelPackages = lib.mkOverride 0 pkgs.linuxPackages_latest; - boot.kernelModules = [ "kvm-intel" ]; + boot.kernelModules = [ "kvm-intel" "amdgpu" ]; boot.kernelParams = [ "lockdown=confidentiality" "intel_iommu=on"