mirror of
https://github.com/Theaninova/TheaninovOS.git
synced 2025-12-12 03:26:17 +00:00
feat: amd stuff
This commit is contained in:
32
modules/nixos/hardware/amdgpu.nix
Normal file
32
modules/nixos/hardware/amdgpu.nix
Normal file
@@ -0,0 +1,32 @@
|
||||
{ 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
|
||||
];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user