summary refs log tree commit diff
path: root/host/Arc/optional/hardware-specific/amd.nix
diff options
context:
space:
mode:
Diffstat (limited to 'host/Arc/optional/hardware-specific/amd.nix')
-rw-r--r--host/Arc/optional/hardware-specific/amd.nix42
1 files changed, 42 insertions, 0 deletions
diff --git a/host/Arc/optional/hardware-specific/amd.nix b/host/Arc/optional/hardware-specific/amd.nix
new file mode 100644

index 0000000..e4758a6 --- /dev/null +++ b/host/Arc/optional/hardware-specific/amd.nix
@@ -0,0 +1,42 @@ +{ + 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 = { + graphics = { + enable = true; + enable32Bit = true; + extraPackages = with pkgs; [ + rocmPackages.clr.icd + #amdvlk + ]; + #extraPackages32 = with pkgs; [ driversi686Linux.amdvlk ]; + }; + }; + + systemd.tmpfiles.rules = [ "L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}" ]; +}