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,8 +1,17 @@
|
|||
{ 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`)"
|
||||
) // {
|
||||
default = true;
|
||||
};
|
||||
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf config.hardware.intelgpu.loadInInitrd {
|
||||
boot.initrd.kernelModules = [ "i915" ];
|
||||
})
|
||||
{
|
||||
environment.variables = {
|
||||
VDPAU_DRIVER = lib.mkIf config.hardware.opengl.enable (lib.mkDefault "va_gl");
|
||||
};
|
||||
|
@ -12,4 +21,6 @@
|
|||
libvdpau-va-gl
|
||||
intel-media-driver
|
||||
];
|
||||
}
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue