2024-02-06 04:46:24 +01:00
|
|
|
{ pkgs, config, lib, ... }:
|
2024-01-28 09:12:50 +01:00
|
|
|
|
2024-02-06 04:46:24 +01:00
|
|
|
let inherit (import ../../options.nix) gpuType; in
|
2024-01-28 09:12:50 +01:00
|
|
|
lib.mkIf ("${gpuType}" == "intel-amd") {
|
|
|
|
nixpkgs.config.packageOverrides =
|
|
|
|
pkgs: {
|
|
|
|
vaapiIntel = pkgs.vaapiIntel.override {
|
|
|
|
enableHybridCodec = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
# OpenGL
|
|
|
|
hardware.opengl = {
|
|
|
|
extraPackages = with pkgs; [
|
|
|
|
intel-media-driver
|
|
|
|
vaapiIntel
|
|
|
|
vaapiVdpau
|
|
|
|
libvdpau-va-gl
|
|
|
|
amdvlk
|
|
|
|
];
|
|
|
|
extraPackages32 = [ pkgs.driversi686Linux.amdvlk ];
|
|
|
|
};
|
|
|
|
|
|
|
|
systemd.tmpfiles.rules = [
|
|
|
|
"L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}"
|
|
|
|
];
|
|
|
|
services.xserver.enable = true;
|
|
|
|
services.xserver.videoDrivers = [ "amdgpu" ];
|
|
|
|
}
|