summaryrefslogtreecommitdiff
path: root/modules/amdgpu.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/amdgpu.nix')
-rw-r--r--modules/amdgpu.nix26
1 files changed, 26 insertions, 0 deletions
diff --git a/modules/amdgpu.nix b/modules/amdgpu.nix
new file mode 100644
index 0000000..898926b
--- /dev/null
+++ b/modules/amdgpu.nix
@@ -0,0 +1,26 @@
+{ pkgs, config, ... }:
+
+{
+ hardware.opengl = {
+ enable = true;
+ driSupport = true;
+ driSupport32Bit = true;
+ };
+
+ hardware.opengl.extraPackages = with pkgs; [
+ rocmPackages.clr.icd
+ amdvlk
+ ];
+
+ hardware.opengl.extraPackages32 = with pkgs; [
+ driversi686Linux.amdvlk
+ ];
+
+ services.xserver.videoDrivers = [ "amdgpu" ];
+
+ systemd.tmpfiles.rules = [
+ "L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}"
+ ];
+
+ # environment.systemPackages = [ pkgs.cudatoolkit ];
+}