summary refs log tree commit diff
path: root/host/Rory-portable/optional/hardware-specific/amd.nix
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2024-06-10 17:33:26 +0200
committerRory& <root@rory.gay>2024-07-04 14:45:02 +0200
commite37b430512bbef89dfe8ab75454286de4836ab6e (patch)
treeaf3468855573725fefc29ab8935edcc663d6b6a3 /host/Rory-portable/optional/hardware-specific/amd.nix
parentBunch of changes (diff)
downloadRory-Open-Architecture-e37b430512bbef89dfe8ab75454286de4836ab6e.tar.xz
Add portable config, some updates
Diffstat (limited to 'host/Rory-portable/optional/hardware-specific/amd.nix')
-rw-r--r--host/Rory-portable/optional/hardware-specific/amd.nix44
1 files changed, 44 insertions, 0 deletions
diff --git a/host/Rory-portable/optional/hardware-specific/amd.nix b/host/Rory-portable/optional/hardware-specific/amd.nix
new file mode 100644
index 0000000..d44766a
--- /dev/null
+++ b/host/Rory-portable/optional/hardware-specific/amd.nix
@@ -0,0 +1,44 @@
+{ config, pkgs, lib, nhekoSrc, mtxclientSrc, ... }:
+
+{
+  imports =
+    [ ];
+
+boot.initrd.kernelModules = [ "amdgpu" ];
+
+  services = {
+    xserver = {
+      windowManager.i3.extraSessionCommands = ''
+        xrandr --output HDMI-1 --mode 3840x2160 --pos 0x0 --rotate normal --primary --output DP-1 --mode 1920x1080 --pos 3840x1080 --rotate normal --output HDMI-2 --off --output DP-2 --off
+      '';
+      wacom.enable = true;
+    };
+    picom.backend = "glx";
+  };
+
+  environment.systemPackages = with pkgs; [
+    rocmPackages.rocm-smi # useful to have
+  ];
+
+  hardware = {
+    opengl = {
+      enable = true;
+      driSupport = true;
+      driSupport32Bit = true;
+      extraPackages = with pkgs; [
+        rocmPackages.clr.icd
+        amdvlk
+      ];
+      extraPackages32 = with pkgs; [
+        driversi686Linux.amdvlk
+      ];
+    };
+  };
+
+  systemd.tmpfiles.rules = [
+    "L+    /opt/rocm/hip   -    -    -     -    ${pkgs.rocmPackages.clr}"
+  ];
+
+  system.stateVersion = "22.11"; # DO NOT EDIT!
+}
+