dotnix/modules/drivers/amd-drivers.nix
2025-03-29 19:05:05 +01:00

15 lines
353 B
Nix

{ lib, pkgs, config, ... }:
with lib;
let
cfg = config.drivers.amdgpu;
in
{
options.drivers.amdgpu = {
enable = mkEnableOption "Enable AMD Drivers";
};
config = mkIf cfg.enable {
systemd.tmpfiles.rules = [ "L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}" ];
services.xserver.videoDrivers = [ "amdgpu" ];
};
}