nixos-config/modules/hardware/amdgpu.nix

20 lines
381 B
Nix
Raw Normal View History

2021-08-31 16:01:29 +00:00
{
config, lib, pkgs, ...
2021-08-31 16:01:29 +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
}