{
config,
lib,
...
}: let
cfg = config.roles.graphics;
in {
imports = [
./amd.nix
./nvidia.nix
];
options.roles.graphics = {
enable = lib.mkEnableOption "graphics drivers";
amd.enable = lib.mkEnableOption "AMDGPU drivers";
nvidia.enable = lib.mkEnableOption "NVIDIA drivers";
};
config = lib.mkIf cfg.enable {
hardware.opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
};
};
}