feat: intel encoding or so lololo

This commit is contained in:
s-prechtl 2025-09-10 14:31:52 +02:00
parent b1167e8ad4
commit 62ce6b0f45
5 changed files with 98 additions and 32 deletions

View file

@ -4,6 +4,7 @@
inputs,
config,
pkgs,
lib,
...
}: let
serverIP = "192.168.0.201";
@ -13,6 +14,8 @@ in {
# Include the results of the hardware scan.
./hardware-configuration.nix
./secrets.nix
./nvidia.nix
./intel.nix
];
# Use the systemd-boot EFI boot loader.

View file

@ -0,0 +1,11 @@
{config, pkgs, ...}: {
services.xserver.videoDrivers = [ "modesetting" ];
hardware.graphics = {
enable = true;
extraPackages = with pkgs; [
intel-media-driver # Enable Hardware Acceleration
vpl-gpu-rt # Enable QSV
];
};
environment.sessionVariables = { LIBVA_DRIVER_NAME = "iHD"; };
}

View file

@ -0,0 +1,51 @@
{config, lib, ...}:
{
nixpkgs.config.allowUnfreePredicate = pkg:
builtins.elem (lib.getName pkg) [
"nvidia-x11"
"nvidia-settings"
];
# Enable OpenGL
hardware.graphics = {
enable = true;
};
# Load nvidia driver for Xorg and Wayland
services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia = {
# Modesetting is required.
modesetting.enable = true;
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
# Enable this if you have graphical corruption issues or application crashes after waking
# up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
# of just the bare essentials.
powerManagement.enable = false;
# Fine-grained power management. Turns off GPU when not in use.
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
powerManagement.finegrained = false;
# Use the NVidia open source kernel module (not to be confused with the
# independent third-party "nouveau" open source driver).
# Support is limited to the Turing and later architectures. Full list of
# supported GPUs is at:
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
# Only available from driver 515.43.04+
open = false;
# Enable the Nvidia settings menu,
# accessible via `nvidia-settings`.
nvidiaSettings = true;
prime = {
sync.enable = true;
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:60:0:0";
};
package = config.boot.kernelPackages.nvidiaPackages.stable;
};
}