nixos-config/modules/gpu/amd.nix

33 lines
830 B
Nix
Raw Normal View History

2020-12-05 15:57:23 +01:00
{ config, lib, pkgs, ... }:
let
cfg = config.sbruder.gpu.amd;
in
2020-10-17 23:17:20 +02:00
{
2020-12-05 15:57:23 +01:00
options.sbruder.gpu.amd.enable = lib.mkEnableOption "amd gpu configuration";
config = lib.mkIf cfg.enable {
hardware.opengl.extraPackages = with pkgs; [
amdvlk
rocm-opencl-icd
];
2020-10-17 23:17:20 +02:00
2020-12-05 15:57:23 +01:00
environment.systemPackages = with pkgs; [
clinfo
radeontop
rocm-smi
];
2020-10-24 13:23:24 +02:00
2020-12-05 15:57:23 +01:00
# force RGB otput for HDMI (otherwise the default is YCbCr)
# see https://gitlab.freedesktop.org/drm/amd/-/issues/476
#boot.kernelPatches = [
# {
# name = "force-rgb";
# patch = pkgs.fetchurl {
# url = "https://gitlab.freedesktop.org/drm/amd/uploads/99b3664a49ec759075bde5c454e1d7c2/0001-force-rgb.patch";
# sha256 = "03dhnlxx9vlj1x8izh3c3j4r9s75q47nx8kf6mbdxqfy3cj96mjm";
# };
# }
#];
};
2020-10-17 23:17:20 +02:00
}