mirror of
https://github.com/NixOS/nixos-hardware
synced 2024-12-25 02:59:45 +01:00
common/gpu/24.05-compat: don't create conflicts with user configuration
fixes https://github.com/NixOS/nixos-hardware/issues/1000
This commit is contained in:
parent
584a5e5518
commit
4e59e4c9e9
1 changed files with 6 additions and 30 deletions
|
@ -1,37 +1,13 @@
|
||||||
{
|
{
|
||||||
config,
|
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
# Backward-compat for 24.05, can be removed after we drop 24.05 support
|
# Backward-compat for 24.05, can be removed after we drop 24.05 support
|
||||||
options = {
|
imports = lib.optionals (lib.versionOlder lib.version "24.11pre") [
|
||||||
hardware.graphics = lib.optionalAttrs (lib.versionOlder lib.version "24.11pre") {
|
(lib.mkAliasOptionModule [ "hardware" "graphics" "enable" ] [ "hardware" "opengl" "enable" ])
|
||||||
enable = lib.mkOption {
|
(lib.mkAliasOptionModule [ "hardware" "graphics" "extraPackages" ] [ "hardware" "opengl" "extraPackages" ])
|
||||||
type = lib.types.bool;
|
(lib.mkAliasOptionModule [ "hardware" "graphics" "extraPackages32" ] [ "hardware" "opengl" "extraPackages32" ])
|
||||||
default = false;
|
(lib.mkAliasOptionModule [ "hardware" "graphics" "enable32Bit" ] [ "hardware" "opengl" "driSupport32Bit" ])
|
||||||
};
|
];
|
||||||
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;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue