summary refs log tree commit diff
path: root/host/Rory-desktop/optional/hardware-specific/amd.nix
blob: 45bea6626001bf79eed14b248d530155e4587f74 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
{ 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}"
  ];

  system.stateVersion = "22.11"; # DO NOT EDIT!
}