[Hardware] Add good intel support and basic nvidia support

This commit is contained in:
Antoine Viallon 2022-01-25 12:08:10 +01:00
parent 7c6198be6f
commit 6322c89fb6
Signed by: aviallon
GPG key ID: 186FC35EDEB25716
4 changed files with 44 additions and 13 deletions

View file

@ -1,8 +1,22 @@
{ config, pkgs, lib, ... }:
with lib;
let
inherit (cfg);
hardwareCfg = config.aviallon.hardware;
in
{
boot.initrd.kernelModules = [ "amdgpu" ];
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
];
};
}