refactor(system): flatten

This commit is contained in:
ooks-io 2024-05-22 22:58:50 +12:00
parent ef1482a65a
commit 8298fc375a
42 changed files with 239 additions and 89 deletions

View file

@ -0,0 +1,37 @@
{ config, lib, pkgs, ... }:
let
gpu = config.systemModules.host.hardware.gpu;
inherit (lib) mkIf;
inherit (builtins) elem;
# vaapiIntel = pkgs.vaapiIntel.override {enableHybridCodec = true;};
in
{
config = mkIf (elem gpu.type ["intel"]) {
services.xserver.videoDrivers = ["modesetting"];
hardware.opengl = {
extraPackages = with pkgs; [
vaapiIntel
vaapiVdpau
libvdpau-va-gl
intel-compute-runtime
intel-media-driver
];
extraPackages32 = with pkgs.pkgsi686Linux; [
vaapiIntel
vaapiVdpau
libvdpau-va-gl
intel-media-driver
];
};
boot.initrd.kernelModules = ["i915"];
environment.variables = mkIf config.hardware.opengl.enable {
VDPAU_DRIVER = "va_gl";
};
};
}