1
0
Fork 0
mirror of https://github.com/NixOS/nixos-hardware synced 2024-11-09 12:39:40 +01:00

Merge pull request #999 from NixOS/remove-dri

Fix and test 24.05 evaluation
This commit is contained in:
Jörg Thalheim 2024-06-22 00:04:00 +02:00 committed by GitHub
commit e6d40db892
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 56 additions and 4 deletions

View file

@ -7,11 +7,14 @@ on:
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
channel: [ nixos-unstable, nixos-24.05 ]
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@V27
with:
nix_path: nixpkgs=channel:nixos-unstable
nix_path: nixpkgs=channel:${{ matrix.channel }}
- name: Show nixpkgs version
run: nix-instantiate --eval -E '(import <nixpkgs> {}).lib.version'
- run: ./tests/run.py

View file

@ -4,6 +4,7 @@
imports = [
../.
../../../common/pc/laptop/ssd
../../../common/gpu/24.05-compat.nix
];
# TODO: reverse compat

View file

@ -8,6 +8,7 @@ in
{
imports = [
../.
../../../common/gpu/24.05-compat.nix
];
services.xserver.videoDrivers = mkDefault [ "nvidiaLegacy340" ];

View file

@ -11,6 +11,7 @@ let
in {
imports = [
../shared.nix
../../../../common/gpu/24.05-compat.nix
];
options.hardware.asus.zephyrus.ga402x.amdgpu = {

View 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;
};
};
}

View file

@ -7,6 +7,7 @@
default = true;
};
imports = [ ../24.05-compat.nix ];
config = lib.mkMerge [
{
services.xserver.videoDrivers = lib.mkDefault [ "modesetting" ];

View file

@ -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 [

View file

@ -1,6 +1,7 @@
{ lib, pkgs, ... }:
{
imports = [ ../24.05-compat.nix ];
services.xserver.videoDrivers = lib.mkDefault [ "nvidia" ];
hardware.graphics.extraPackages = with pkgs; [
vaapiVdpau

View file

@ -1,8 +1,6 @@
{
config,
lib,
pkgs,
inputs,
...
}: {
imports = [

View file

@ -6,6 +6,7 @@ in
../../common/pc/laptop
../../common/pc/laptop/ssd
../../common/hidpi.nix
../../common/gpu/24.05-compat.nix
];
# Necessary kernel modules

View file

@ -1,5 +1,8 @@
{ lib, ... }:
{
imports = [
../../../../common/gpu/24.05-compat.nix
];
hardware = {
graphics = {
enable = lib.mkDefault true;

View file

@ -1,5 +1,6 @@
{ config, lib, ... }: {
imports = [
../../../common/gpu/24.05-compat.nix
../../../common/gpu/nvidia/prime.nix
../../../common/cpu/intel
../../../common/cpu/intel/kaby-lake

View file

@ -1,5 +1,6 @@
{ lib, config, ... }: {
imports = [
../../../common/gpu/24.05-compat.nix
../../../common/gpu/nvidia/prime.nix
../../../common/cpu/intel
../../../common/pc/laptop/acpi_call.nix

View file

@ -4,6 +4,7 @@
imports = [
../../../thinkpad/yoga.nix
../../../../common/gpu/amd/default.nix
../../../../common/gpu/24.05-compat.nix
];
boot.initrd.kernelModules = [ "ideapad_laptop" ];

View file

@ -8,6 +8,7 @@ let
in {
imports = [
../shared.nix
../../../../../common/gpu/24.05-compat.nix
];
# AMD RX680

View file

@ -81,7 +81,7 @@ def write_eval_test(f: IO[str], profiles: list[str]) -> None:
continue
system = "x86_64-linux"
if "raspberry-pi/4" == profile or "raspberry-pi/5" == profile:
if profile in ("raspberry-pi/4", "raspberry-pi/5"):
system = "aarch64-linux"
f.write(