mirror of
https://github.com/Theaninova/TheaninovOS.git
synced 2025-12-12 03:26:17 +00:00
33 lines
732 B
Nix
33 lines
732 B
Nix
{ pkgs, lib, config, ... }:
|
|
with lib;
|
|
|
|
let cfg = config.hardware.amdgpu.preset.default;
|
|
|
|
in {
|
|
options.hardware.amdgpu.preset.default = {
|
|
enable =
|
|
mkEnableOption "Enable ADM GPU driver support with some sane defaults";
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
hardware.opengl = {
|
|
enable = true;
|
|
driSupport = true;
|
|
extraPackages = with pkgs; [ rocmPackages.clr.icd ];
|
|
};
|
|
|
|
boot = {
|
|
# https://docs.kernel.org/gpu/amdgpu/module-parameters.html
|
|
kernelParams = [ "amdgpu.seamless=1" "amdgpu.freesync_video=1" ];
|
|
initrd.kernelModules = [ "amdgpu" ];
|
|
};
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
amdgpu_top
|
|
glxinfo
|
|
libva-utils
|
|
vulkan-tools
|
|
];
|
|
};
|
|
}
|