2021-08-31 16:01:29 +00:00
|
|
|
{
|
2021-11-01 20:33:21 +00:00
|
|
|
config, lib, pkgs, ...
|
2021-08-31 16:01:29 +00:00
|
|
|
}:
|
|
|
|
|
2021-11-01 20:33:21 +00:00
|
|
|
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" ];
|
|
|
|
};
|
2021-08-31 16:01:29 +00:00
|
|
|
}
|