mirror of
https://github.com/NixOS/nixos-hardware
synced 2024-12-18 23:59:45 +01:00
common/gpu/intel: Make initrd - i915 an option
This commit is contained in:
parent
797f8d8082
commit
0335d1a093
1 changed files with 19 additions and 8 deletions
|
@ -1,15 +1,26 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
boot.initrd.kernelModules = [ "i915" ];
|
options.hardware.intelgpu.loadInInitrd = lib.mkEnableOption (lib.mdDoc
|
||||||
|
"loading `i195` kernelModule at stage 1. (Add `i915` to `boot.initrd.kernelModules`)"
|
||||||
environment.variables = {
|
) // {
|
||||||
VDPAU_DRIVER = lib.mkIf config.hardware.opengl.enable (lib.mkDefault "va_gl");
|
default = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
hardware.opengl.extraPackages = with pkgs; [
|
config = lib.mkMerge [
|
||||||
(if (lib.versionOlder (lib.versions.majorMinor lib.version) "23.11") then vaapiIntel else intel-vaapi-driver)
|
(lib.mkIf config.hardware.intelgpu.loadInInitrd {
|
||||||
libvdpau-va-gl
|
boot.initrd.kernelModules = [ "i915" ];
|
||||||
intel-media-driver
|
})
|
||||||
|
{
|
||||||
|
environment.variables = {
|
||||||
|
VDPAU_DRIVER = lib.mkIf config.hardware.opengl.enable (lib.mkDefault "va_gl");
|
||||||
|
};
|
||||||
|
|
||||||
|
hardware.opengl.extraPackages = with pkgs; [
|
||||||
|
(if (lib.versionOlder (lib.versions.majorMinor lib.version) "23.11") then vaapiIntel else intel-vaapi-driver)
|
||||||
|
libvdpau-va-gl
|
||||||
|
intel-media-driver
|
||||||
|
];
|
||||||
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue