diff options
| author | Raghuram Subramani <raghus2247@gmail.com> | 2024-03-11 16:33:35 +0530 |
|---|---|---|
| committer | Raghuram Subramani <raghus2247@gmail.com> | 2024-03-11 16:33:35 +0530 |
| commit | f6e4bf8a2e28c08618e9a368f2b3eccdb7397ced (patch) | |
| tree | 5a85a33c7550908d77869d65a29afef1b42ac6ca | |
| parent | f48007d6499add3da5558e8c271b568f67a0104f (diff) | |
update
| -rw-r--r-- | machines/x/configuration.nix | 1 | ||||
| -rw-r--r-- | modules/amd.nix | 8 | ||||
| -rw-r--r-- | modules/amdgpu.nix | 7 | ||||
| -rw-r--r-- | modules/nvidia.nix | 12 |
4 files changed, 17 insertions, 11 deletions
diff --git a/machines/x/configuration.nix b/machines/x/configuration.nix index d7bece0..8f31309 100644 --- a/machines/x/configuration.nix +++ b/machines/x/configuration.nix @@ -7,6 +7,7 @@ ] ++ (map (path: ../../modules/${path}) [ "core/global.nix" "amdgpu.nix" + "amd.nix" "nvidia.nix" "core/audio.nix" "core/bluetooth.nix" diff --git a/modules/amd.nix b/modules/amd.nix new file mode 100644 index 0000000..6ec3e2b --- /dev/null +++ b/modules/amd.nix @@ -0,0 +1,8 @@ +{ lib, config, ... }: +let + kver = config.boot.kernelPackages.kernel.version; +in +{ + boot.kernelParams = [ "amd_pstate=active" ]; + hardware.cpu.amd.updateMicrocode = config.hardware.enableRedistributableFirmware; +} diff --git a/modules/amdgpu.nix b/modules/amdgpu.nix index 4d4bb4c..5dcd9b0 100644 --- a/modules/amdgpu.nix +++ b/modules/amdgpu.nix @@ -19,9 +19,12 @@ services.xserver.videoDrivers = [ "amdgpu" ]; boot.initrd.kernelModules = [ "amdgpu" ]; + opengl.extraPackages = with pkgs; [ + vaapiVdpau + libvdpau-va-gl + ]; + systemd.tmpfiles.rules = [ "L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}" ]; - - # environment.systemPackages = [ pkgs.cudatoolkit ]; } diff --git a/modules/nvidia.nix b/modules/nvidia.nix index d79f2bb..16966e0 100644 --- a/modules/nvidia.nix +++ b/modules/nvidia.nix @@ -1,20 +1,14 @@ { pkgs, config, ... }: { - hardware.opengl = { - enable = true; - driSupport = true; - driSupport32Bit = true; - }; - services.xserver.videoDrivers = [ "nvidia" ]; hardware.nvidia = { modesetting.enable = true; - powerManagement.enable = false; + powerManagement.enable = true; powerManagement.finegrained = false; open = false; - nvidiaSettings = false; + nvidiaSettings = true; package = config.boot.kernelPackages.nvidiaPackages.stable; prime = { @@ -22,7 +16,7 @@ enable = true; enableOffloadCmd = true; }; - amdgpuBusId = "PCI:0:2:0"; + amdgpuBusId = "PCI:5:0:0"; nvidiaBusId = "PCI:1:0:0"; }; }; |
