nixos-config/modules/hardware/amdgpu.nix

20 lines
381 B
Nix

{
config, lib, pkgs, ...
}:
let
cfg = config.ptw.hardware.amdgpu;
in {
options.ptw.hardware.amdgpu = {
enable = lib.mkEnableOption "Enable support for AMDGPU GPUs";
};
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
unstable.mesa
unstable.firmwareLinuxNonfree
];
services.xserver.videoDrivers = [ "amdgpu" ];
};
}