mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-06 01:38:06 +00:00
24 lines
573 B
Nix
24 lines
573 B
Nix
{ config, pkgs, lib, ... }:
|
|
with lib;
|
|
let
|
|
hardwareCfg = config.aviallon.hardware;
|
|
in
|
|
{
|
|
config = mkIf (hardwareCfg.gpuVendor == "amd") {
|
|
boot.initrd.kernelModules = [ "amdgpu" ];
|
|
|
|
aviallon.boot.cmdline = {}
|
|
# 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
|
|
];
|
|
};
|
|
}
|