1. Security: Navidrome no longer exposed to network (localhost only) 2. Maintainability: Single username definition in flake.nix:45 3. Organization: Kernel params now in configuration.nix, session vars in desktop.nix 4. Automation: Flathub repository added automatically on activation 5. Cleanup: Removed duplicate programs.dconf.enable
62 lines
1.6 KiB
Nix
62 lines
1.6 KiB
Nix
# modules/gpu-amd.nix
|
|
# AMD GPU configuration: drivers, Vulkan, VA-API hardware acceleration, CoreCtrl
|
|
{
|
|
config,
|
|
pkgs,
|
|
lib,
|
|
username,
|
|
...
|
|
}:
|
|
|
|
{
|
|
# Enable OpenGL/Vulkan
|
|
hardware.graphics = {
|
|
enable = true;
|
|
enable32Bit = true; # For Steam and 32-bit games
|
|
|
|
extraPackages = with pkgs; [
|
|
# VA-API for hardware video acceleration
|
|
libva-vdpau-driver # Renamed from vaapiVdpau
|
|
libvdpau-va-gl
|
|
|
|
# OpenCL support (optional, for compute workloads)
|
|
rocmPackages.clr.icd
|
|
];
|
|
|
|
extraPackages32 = with pkgs.driversi686Linux; [
|
|
# 32-bit VA-API support for older games
|
|
libva-vdpau-driver
|
|
libvdpau-va-gl
|
|
];
|
|
};
|
|
|
|
# RADV (Mesa Vulkan driver) is enabled by default and is the best choice for gaming
|
|
# No need for AMD_VULKAN_ICD environment variable anymore
|
|
|
|
# CoreCtrl for fan curves, overclocking, and GPU monitoring
|
|
programs.corectrl.enable = true;
|
|
|
|
# AMD GPU overdrive/overclocking support
|
|
hardware.amdgpu.overdrive.enable = true;
|
|
|
|
# Add user to corectrl group for full access without password
|
|
users.users.${username}.extraGroups = [ "corectrl" ];
|
|
|
|
# NOTE: Kernel params (amdgpu.ppfeaturemask) are in configuration.nix
|
|
|
|
# GPU monitoring tools
|
|
environment.systemPackages = with pkgs; [
|
|
# Monitoring
|
|
radeontop # AMD GPU monitoring (like nvidia-smi)
|
|
nvtopPackages.amd # Modern GPU monitor with AMD support
|
|
|
|
# Vulkan tools
|
|
vulkan-tools # vulkaninfo, etc.
|
|
vulkan-loader
|
|
|
|
# Video acceleration verification
|
|
libva-utils # vainfo - verify VA-API
|
|
vdpauinfo # Verify VDPAU
|
|
];
|
|
}
|