1
0
Fork 0
mirror of https://github.com/NixOS/nixos-hardware synced 2024-11-27 05:19:43 +01:00

Merge pull request #389 from bbigras/intel-gpu

extract GPU stuff from common/cpu/intel to common/gpu/intel.nix
This commit is contained in:
Jörg Thalheim 2022-04-21 07:32:14 +01:00 committed by GitHub
commit 7b0845d8c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 29 additions and 14 deletions

View file

@ -0,0 +1,6 @@
{ config, lib, pkgs, ... }:
{
hardware.cpu.intel.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -1,19 +1,8 @@
{ config, lib, pkgs, ... }:
{
boot.initrd.kernelModules = [ "i915" ];
environment.variables = {
VDPAU_DRIVER = lib.mkIf config.hardware.opengl.enable (lib.mkDefault "va_gl");
};
hardware.cpu.intel.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.opengl.extraPackages = with pkgs; [
vaapiIntel
vaapiVdpau
libvdpau-va-gl
intel-media-driver
imports = [
./cpu-only.nix
../../gpu/intel.nix
];
}

15
common/gpu/intel.nix Normal file
View 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
];
}

View file

@ -19,4 +19,8 @@ in
offload.enable = lib.mkDefault true;
# Hardware should specify the bus ID for intel/nvidia devices
};
hardware.opengl.extraPackages = with pkgs; [
vaapiVdpau
];
}

View file

@ -121,6 +121,7 @@
common-cpu-amd = import ./common/cpu/amd;
common-cpu-intel = import ./common/cpu/intel;
common-cpu-intel-cpu-only = import ./common/cpu/intel/cpu-only.nix;
common-cpu-intel-kaby-lake = import ./common/cpu/intel/kaby-lake;
common-cpu-intel-sandy-bridge = import ./common/cpu/intel/sandy-bridge;
common-gpu-amd = import ./common/gpu/amd;