Merge pull request #999 from NixOS/remove-dri
Fix and test 24.05 evaluation
This commit is contained in:
commit
e6d40db892
5
.github/workflows/test.yml
vendored
5
.github/workflows/test.yml
vendored
|
@ -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
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
imports = [
|
||||
../.
|
||||
../../../common/pc/laptop/ssd
|
||||
../../../common/gpu/24.05-compat.nix
|
||||
];
|
||||
|
||||
# TODO: reverse compat
|
||||
|
|
|
@ -8,6 +8,7 @@ in
|
|||
{
|
||||
imports = [
|
||||
../.
|
||||
../../../common/gpu/24.05-compat.nix
|
||||
];
|
||||
|
||||
services.xserver.videoDrivers = mkDefault [ "nvidiaLegacy340" ];
|
||||
|
|
|
@ -11,6 +11,7 @@ let
|
|||
in {
|
||||
imports = [
|
||||
../shared.nix
|
||||
../../../../common/gpu/24.05-compat.nix
|
||||
];
|
||||
|
||||
options.hardware.asus.zephyrus.ga402x.amdgpu = {
|
||||
|
|
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
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
|
|
|
@ -6,6 +6,7 @@ in
|
|||
../../common/pc/laptop
|
||||
../../common/pc/laptop/ssd
|
||||
../../common/hidpi.nix
|
||||
../../common/gpu/24.05-compat.nix
|
||||
];
|
||||
|
||||
# Necessary kernel modules
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
imports = [
|
||||
../../../../common/gpu/24.05-compat.nix
|
||||
];
|
||||
hardware = {
|
||||
graphics = {
|
||||
enable = lib.mkDefault true;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
imports = [
|
||||
../../../thinkpad/yoga.nix
|
||||
../../../../common/gpu/amd/default.nix
|
||||
../../../../common/gpu/24.05-compat.nix
|
||||
];
|
||||
|
||||
boot.initrd.kernelModules = [ "ideapad_laptop" ];
|
||||
|
|
|
@ -8,6 +8,7 @@ let
|
|||
in {
|
||||
imports = [
|
||||
../shared.nix
|
||||
../../../../../common/gpu/24.05-compat.nix
|
||||
];
|
||||
|
||||
# AMD RX680
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue