mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-06 09:47:52 +00:00
22 lines
550 B
Nix
22 lines
550 B
Nix
{ config, pkgs, lib, ... }:
|
|
with lib;
|
|
let
|
|
hardwareCfg = config.aviallon.hardware;
|
|
in
|
|
{
|
|
config = mkIf (hardwareCfg.gpuVendor == "amd") {
|
|
boot.initrd.kernelModules = [ "amdgpu" ];
|
|
|
|
boot.kernelParams = concatLists [
|
|
# for Southern Islands (SI ie. GCN 1) cards
|
|
[ "radeon.si_support=0" "amdgpu.si_support=1" ]
|
|
# for Sea Islands (CIK ie. GCN 2) cards
|
|
[ "radeon.cik_support=0" "amdgpu.cik_support=1" ]
|
|
];
|
|
|
|
hardware.opengl.extraPackages = with pkgs; [
|
|
rocm-opencl-icd
|
|
rocm-opencl-runtime
|
|
];
|
|
};
|
|
}
|