remove driSupport, opengl → graphics

This commit is contained in:
toastal 2024-06-21 20:44:42 +07:00 committed by mergify[bot]
parent 083823b790
commit cc634b69c8
20 changed files with 77 additions and 80 deletions

View file

@ -19,9 +19,6 @@
];
};
# TODO: reverse compat
hardware.opengl.driSupport = false;
# TODO: reverse compat
services.xserver = {
defaultDepth = lib.mkDefault 24;

View file

@ -1,3 +1,5 @@
{ lib, ... }:
{
imports = [
../.
@ -5,7 +7,7 @@
];
# TODO: reverse compat
hardware.opengl.driSupport32Bit = true;
hardware.graphics.enable32Bit = lib.mkDefault true;
services.xserver = {
# TODO: we should not enable unfree drivers

View file

@ -12,17 +12,18 @@ in
services.xserver.videoDrivers = mkDefault [ "nvidiaLegacy340" ];
hardware.opengl = {
hardware = {
graphics = {
enable = mkDefault true;
driSupport = mkDefault true;
driSupport32Bit = mkDefault true;
enable32Bit = mkDefault true;
};
hardware.nvidia = {
nvidia = {
modesetting.enable = mkDefault true;
powerManagement.enable = mkDefault false;
powerManagement.finegrained = mkDefault false;
open = mkDefault false;
nvidiaSettings = mkDefault true;
};
};
}

View file

@ -26,7 +26,7 @@ in {
hardware = {
amdgpu.loadInInitrd = true;
opengl.extraPackages = with pkgs; [
graphics.extraPackages = with pkgs; [
vaapiVdpau
libvdpau-va-gl
];

View file

@ -26,7 +26,7 @@ in {
hardware = {
## Enable the Nvidia card, as well as Prime and Offload:
amdgpu.loadInInitrd = true;
opengl.extraPackages = with pkgs; [
graphics.extraPackages = with pkgs; [
# Also in nvidia/default.nix
vaapiVdpau
libvdpau-va-gl

View file

@ -11,9 +11,9 @@
{
services.xserver.videoDrivers = lib.mkDefault [ "modesetting" ];
hardware.opengl = {
driSupport = lib.mkDefault true;
driSupport32Bit = lib.mkDefault true;
hardware.graphics = {
enable = lib.mkDefault true;
enable32Bit = lib.mkDefault true;
};
}
(lib.mkIf config.hardware.amdgpu.loadInInitrd {

View file

@ -26,10 +26,10 @@
boot.initrd.kernelModules = [ config.hardware.intelgpu.driver ];
environment.variables = {
VDPAU_DRIVER = lib.mkIf config.hardware.opengl.enable (lib.mkDefault "va_gl");
VDPAU_DRIVER = lib.mkIf config.hardware.graphics.enable (lib.mkDefault "va_gl");
};
hardware.opengl.extraPackages = with pkgs; [
hardware.graphics.extraPackages = with pkgs; [
(
if (lib.versionOlder (lib.versions.majorMinor lib.version) "23.11") then
vaapiIntel
@ -40,7 +40,7 @@
intel-media-driver
];
hardware.opengl.extraPackages32 = with pkgs.driversi686Linux; [
hardware.graphics.extraPackages32 = with pkgs.driversi686Linux; [
(
if (lib.versionOlder (lib.versions.majorMinor lib.version) "23.11") then
vaapiIntel

View file

@ -2,7 +2,7 @@
{
services.xserver.videoDrivers = lib.mkDefault [ "nvidia" ];
hardware.opengl.extraPackages = with pkgs; [
hardware.graphics.extraPackages = with pkgs; [
vaapiVdpau
];
}

View file

@ -21,7 +21,12 @@
};
boot.kernelParams = ["i915.modeset=1"];
hardware.nvidia = {
hardware = {
graphics = {
enable = lib.mkDefault true;
enable32Bit = lib.mkDefault true;
};
nvidia = {
package = config.boot.kernelPackages.nvidiaPackages.legacy_390;
nvidiaSettings = lib.mkDefault true;
modesetting.enable = lib.mkDefault true;
@ -31,15 +36,11 @@
nvidiaBusId = "PCI:1:0:0";
};
};
hardware.opengl = {
enable = lib.mkDefault true;
driSupport = lib.mkDefault true;
driSupport32Bit = lib.mkDefault true;
};
# Override the intel gpu driver setting imported above
environment.variables = {
VDPAU_DRIVER = lib.mkIf config.hardware.opengl.enable (lib.mkOverride 990 "nvidia");
VDPAU_DRIVER = lib.mkIf config.hardware.graphics.enable (lib.mkOverride 990 "nvidia");
};
services.thermald.enable = lib.mkDefault true;

View file

@ -5,6 +5,11 @@
services.switcherooControl.enable = lib.mkDefault true;
hardware = {
graphics = {
enable = lib.mkDefault true;
enable32Bit = lib.mkDefault true;
extraPackages = with pkgs; [ intel-media-driver intel-compute-runtime ];
};
nvidia = {
prime = {
# Bus ID of the Intel GPU.
@ -20,10 +25,5 @@
finegrained = lib.mkDefault true;
};
};
opengl = {
enable = lib.mkDefault true;
driSupport32Bit = lib.mkDefault true;
extraPackages = with pkgs; [ intel-media-driver intel-compute-runtime ];
};
};
}

View file

@ -18,10 +18,9 @@
boot.blacklistedKernelModules = [ "i2c_nvidia_gpu" ];
hardware.nvidia.modesetting.enable = lib.mkDefault true;
hardware.opengl = {
hardware.graphics = {
enable = lib.mkDefault true;
driSupport = lib.mkDefault true;
driSupport32Bit = lib.mkDefault true;
enable32Bit = lib.mkDefault true;
};
hardware.nvidia.prime = {

View file

@ -14,7 +14,7 @@ in
# GPU is an Intel Iris Xe, on a “TigerLake” mobile CPU
boot.initrd.kernelModules = [ "i915" ]; # Early loading so the passphrase prompt appears on external displays
services.xserver.videoDrivers = [ "intel" ];
hardware.opengl.extraPackages = with pkgs; [
hardware.graphics.extraPackages = with pkgs; [
intel-media-driver
(if (lib.versionOlder (lib.versions.majorMinor lib.version) "23.11") then vaapiIntel else intel-vaapi-driver)
];

View file

@ -1,13 +1,18 @@
{ lib, ... }:
{
hardware.nvidia.modesetting.enable = true;
hardware.opengl.driSupport32Bit = true;
hardware.opengl.enable = true;
hardware.nvidia.prime = {
hardware = {
graphics = {
enable = lib.mkDefault true;
enable32Bit = lib.mkDefault true;
};
nvidia = {
modesetting.enable = lib.mkDefault true;
prime = {
# Bus ID of the Intel GPU.
intelBusId = lib.mkDefault "PCI:0:2:0";
# Bus ID of the NVIDIA GPU.
nvidiaBusId = lib.mkDefault "PCI:1:0:0";
};
};
};
}

View file

@ -13,12 +13,6 @@
nvidiaBusId = lib.mkDefault "PCI:1:0:0";
};
};
# is this too much? It's convenient for Steam.
opengl = {
driSupport = lib.mkDefault true;
driSupport32Bit = lib.mkDefault true;
};
};
# required to make wireless work

View file

@ -8,18 +8,17 @@
];
hardware = {
graphics = {
enable = lib.mkDefault true;
enable32Bit = lib.mkDefault true;
};
nvidia = {
prime = {
intelBusId = lib.mkDefault "PCI:0:2:0";
nvidiaBusId = lib.mkDefault "PCI:1:0:0";
};
};
# is this too much? It's convenient for Steam.
opengl = {
driSupport = lib.mkDefault true;
driSupport32Bit = lib.mkDefault true;
};
};
# required to make wireless work

View file

@ -7,18 +7,18 @@
];
hardware = {
# is this too much? It's convenient for Steam.
graphics = {
enable = lib.mkDefault true;
enable32Bit = lib.mkDefault true;
};
nvidia = {
prime = {
intelBusId = lib.mkDefault "PCI:0:2:0";
nvidiaBusId = lib.mkDefault "PCI:1:0:0";
};
};
# is this too much? It's convenient for Steam.
opengl = {
driSupport = lib.mkDefault true;
driSupport32Bit = lib.mkDefault true;
};
};
# required to make wireless work

View file

@ -7,7 +7,7 @@
];
boot.initrd.kernelModules = [ "ideapad_laptop" ];
hardware.opengl.extraPackages = with pkgs; [
hardware.graphics.extraPackages = with pkgs; [
vaapiVdpau
libvdpau-va-gl
];

View file

@ -15,7 +15,7 @@ in {
hardware = {
amdgpu.loadInInitrd = true;
opengl.extraPackages = with pkgs; [
graphics.extraPackages = with pkgs; [
vaapiVdpau
libvdpau-va-gl
];

View file

@ -19,7 +19,7 @@ in {
hardware = {
## Enable the Nvidia card, as well as Prime and Offload:
amdgpu.loadInInitrd = true;
opengl.extraPackages = with pkgs; [
graphics.extraPackages = with pkgs; [
vaapiVdpau
libvdpau-va-gl
];

View file

@ -7,10 +7,9 @@
boot.initrd.kernelModules = [ "nvidia" ];
hardware.opengl = {
hardware.graphics = {
enable = lib.mkDefault true;
# adds ~100MB of 32-bit mesa drivers.
driSupport32Bit = lib.mkDefault true;
enable32Bit = lib.mkDefault true;
};
hardware.nvidia = {