1
0
Fork 0
mirror of https://github.com/NixOS/nixos-hardware synced 2024-11-26 21:09:42 +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: jobs:
tests: tests:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy:
matrix:
channel: [ nixos-unstable, nixos-24.05 ]
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: cachix/install-nix-action@V27 - uses: cachix/install-nix-action@V27
with: with:
nix_path: nixpkgs=channel:nixos-unstable nix_path: nixpkgs=channel:${{ matrix.channel }}
- name: Show nixpkgs version - name: Show nixpkgs version
run: nix-instantiate --eval -E '(import <nixpkgs> {}).lib.version' run: nix-instantiate --eval -E '(import <nixpkgs> {}).lib.version'
- run: ./tests/run.py - run: ./tests/run.py

View file

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

View file

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

View file

@ -11,6 +11,7 @@ let
in { in {
imports = [ imports = [
../shared.nix ../shared.nix
../../../../common/gpu/24.05-compat.nix
]; ];
options.hardware.asus.zephyrus.ga402x.amdgpu = { 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; default = true;
}; };
imports = [ ../24.05-compat.nix ];
config = lib.mkMerge [ config = lib.mkMerge [
{ {
services.xserver.videoDrivers = lib.mkDefault [ "modesetting" ]; services.xserver.videoDrivers = lib.mkDefault [ "modesetting" ];

View file

@ -5,6 +5,7 @@
... ...
}: }:
{ {
imports = [ ../24.05-compat.nix ];
options.hardware.intelgpu.driver = lib.mkOption { options.hardware.intelgpu.driver = lib.mkOption {
description = "Intel GPU driver to use"; description = "Intel GPU driver to use";
type = lib.types.enum [ type = lib.types.enum [

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -81,7 +81,7 @@ def write_eval_test(f: IO[str], profiles: list[str]) -> None:
continue continue
system = "x86_64-linux" 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" system = "aarch64-linux"
f.write( f.write(