2025.04.30-20:50
This commit is contained in:
42
nixos_24.11_cinnamon/config/gpu-amd.nix
Normal file
42
nixos_24.11_cinnamon/config/gpu-amd.nix
Normal file
@ -0,0 +1,42 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
|
||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||
|
||||
# Enable amdgpu
|
||||
services.xserver = {
|
||||
videoDrivers = [ "amdgpu" ];
|
||||
deviceSection = ''Option "TearFree" "true"'';
|
||||
};
|
||||
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
|
||||
# Enable AMDVLK and OpenCL
|
||||
hardware.graphics.extraPackages = with pkgs; [
|
||||
amdvlk
|
||||
rocmPackages.clr.icd
|
||||
];
|
||||
|
||||
hardware.graphics.extraPackages32 = with pkgs; [
|
||||
driversi686Linux.amdvlk
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
lact # Linux AMDGPU Controller
|
||||
hwdata # Hardware Database, including Monitors, pci.ids, usb.ids, and video cards
|
||||
libdrm
|
||||
vulkan-loader
|
||||
vulkan-tools
|
||||
vkbasalt
|
||||
radeontop
|
||||
xorg.xf86videoamdgpu
|
||||
];
|
||||
|
||||
systemd.packages = with pkgs; [ lact ];
|
||||
systemd.services.lactd.wantedBy = ["multi-user.target"];
|
||||
|
||||
}
|
Reference in New Issue
Block a user