1
0
Fork 0
mirror of https://github.com/NixOS/nixos-hardware synced 2024-09-19 21:07:23 +02:00
nixos-hardware/common/gpu/24.05-compat.nix

38 lines
1,001 B
Nix
Raw Normal View History

2024-06-21 23:26:44 +02:00
{
config,
lib,
...
}:
{
# Backward-compat for 24.05, can be removed after we drop 24.05 support
options = {
hardware.graphics = lib.optionalAttrs (lib.versionOlder lib.version "24.11pre") {
enable = lib.mkOption {
type = lib.types.bool;
default = false;
};
enable32Bit = lib.mkOption {
type = lib.types.bool;
default = false;
};
extraPackages = lib.mkOption {
type = lib.types.listOf lib.types.package;
default = [];
};
extraPackages32 = lib.mkOption {
type = lib.types.listOf lib.types.package;
default = [];
};
};
};
config = {
hardware.opengl = lib.optionalAttrs (lib.versionOlder lib.version "24.11pre") {
enable = config.hardware.graphics.enable;
driSupport32Bit = config.hardware.graphics.enable32Bit;
extraPackages = config.hardware.graphics.extraPackages;
extraPackages32 = config.hardware.graphics.extraPackages32;
};
};
}