summaryrefslogtreecommitdiffstats
path: root/nixos/modules/hardware
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/modules/hardware')
-rw-r--r--nixos/modules/hardware/video/amdgpu-pro.nix16
1 files changed, 15 insertions, 1 deletions
diff --git a/nixos/modules/hardware/video/amdgpu-pro.nix b/nixos/modules/hardware/video/amdgpu-pro.nix
index 5cc96d8bd074..50af022b93c8 100644
--- a/nixos/modules/hardware/video/amdgpu-pro.nix
+++ b/nixos/modules/hardware/video/amdgpu-pro.nix
@@ -15,13 +15,19 @@ let
opengl = config.hardware.opengl;
+ kernel = pkgs.linux_4_9.override {
+ extraConfig = ''
+ KALLSYMS_ALL y
+ '';
+ };
+
in
{
config = mkIf enabled {
- nixpkgs.config.xorg.abiCompat = "1.18";
+ nixpkgs.config.xorg.abiCompat = "1.19";
services.xserver.drivers = singleton
{ name = "amdgpu"; modules = [ package ]; libPath = [ package ]; };
@@ -31,6 +37,9 @@ in
boot.extraModulePackages = [ package ];
+ boot.kernelPackages =
+ pkgs.recurseIntoAttrs (pkgs.linuxPackagesFor kernel);
+
boot.blacklistedKernelModules = [ "radeon" ];
hardware.firmware = [ package ];
@@ -38,10 +47,15 @@ in
system.activationScripts.setup-amdgpu-pro = ''
mkdir -p /run/lib
ln -sfn ${package}/lib ${package.libCompatDir}
+ ln -sfn ${package} /run/amdgpu-pro
'' + optionalString opengl.driSupport32Bit ''
ln -sfn ${package32}/lib ${package32.libCompatDir}
'';
+ system.requiredKernelConfig = with config.lib.kernelConfig; [
+ (isYes "KALLSYMS_ALL")
+ ];
+
environment.etc = {
"amd/amdrc".source = package + "/etc/amd/amdrc";
"amd/amdapfxx.blb".source = package + "/etc/amd/amdapfxx.blb";