mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2025-11-08 19:46:10 +01:00
fix 24.05 evaluation
This commit is contained in:
parent
cc634b69c8
commit
584a5e5518
16 changed files with 56 additions and 4 deletions
37
common/gpu/24.05-compat.nix
Normal file
37
common/gpu/24.05-compat.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
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;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -7,6 +7,7 @@
|
|||
default = true;
|
||||
};
|
||||
|
||||
imports = [ ../24.05-compat.nix ];
|
||||
config = lib.mkMerge [
|
||||
{
|
||||
services.xserver.videoDrivers = lib.mkDefault [ "modesetting" ];
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
...
|
||||
}:
|
||||
{
|
||||
imports = [ ../24.05-compat.nix ];
|
||||
options.hardware.intelgpu.driver = lib.mkOption {
|
||||
description = "Intel GPU driver to use";
|
||||
type = lib.types.enum [
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
{ lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [ ../24.05-compat.nix ];
|
||||
services.xserver.videoDrivers = lib.mkDefault [ "nvidia" ];
|
||||
hardware.graphics.extraPackages = with pkgs; [
|
||||
vaapiVdpau
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue