mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2025-11-05 17:38:41 +08:00
common/gpu/intel*: Migrate to common/gpu/intel/* and add disable
This commit is contained in:
@@ -1,15 +1,11 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
boot.initrd.kernelModules = [ "i915" ];
|
||||
imports = [ ./intel ];
|
||||
|
||||
environment.variables = {
|
||||
VDPAU_DRIVER = lib.mkIf config.hardware.opengl.enable (lib.mkDefault "va_gl");
|
||||
};
|
||||
warnings = [
|
||||
''
|
||||
DEPRECATED: The <nixos-hardware/common/gpu/intel.nix> module has been deprecated.
|
||||
|
||||
hardware.opengl.extraPackages = with pkgs; [
|
||||
vaapiIntel
|
||||
libvdpau-va-gl
|
||||
intel-media-driver
|
||||
Switch to using <nixos-hardware/common/gpu/intel> instead.
|
||||
''
|
||||
];
|
||||
}
|
||||
|
||||
15
common/gpu/intel/default.nix
Normal file
15
common/gpu/intel/default.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
boot.initrd.kernelModules = [ "i915" ];
|
||||
|
||||
environment.variables = {
|
||||
VDPAU_DRIVER = lib.mkIf config.hardware.opengl.enable (lib.mkDefault "va_gl");
|
||||
};
|
||||
|
||||
hardware.opengl.extraPackages = with pkgs; [
|
||||
vaapiIntel
|
||||
libvdpau-va-gl
|
||||
intel-media-driver
|
||||
];
|
||||
}
|
||||
7
common/gpu/intel/disable.nix
Normal file
7
common/gpu/intel/disable.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{ lib, ... }:
|
||||
|
||||
{
|
||||
boot.blacklistedKernelModules = lib.mkDefault [ "i915" ];
|
||||
# KMS will load the module, regardless of blacklisting
|
||||
boot.kernelParams = lib.mkDefault [ "i915.modeset=0" ];
|
||||
}
|
||||
Reference in New Issue
Block a user