Files
nix-config/hosts/idols-ai/hardware-intel.nix
T
ryan4yin | 二花 d056aece28 chore(workarounds): re-evaluate stale hardware/kernel fixes (#360)
* chore(workarounds): re-evaluate stale hardware/kernel fixes

Prune workarounds whose root cause is gone, fix one vendor typo, and
document the ones we keep:

- drop `transparent_hugepage=madvise` on shoryu/shushou/youko: it was tied to
  the old fixed 1G hugetlb pool, and the VMs now use ordinary memory
- shoryu: `hardware.cpu.intel.updateMicrocode` -> `amd` (it is an AMD APU)
- ai: drop `i915.enable_guc=3` (GuC/HuC submission is the default on modern
  i915/Xe)
- kernel-hardening: name the Dirty Frag CVEs (CVE-2026-43284 / CVE-2026-43500)
  and the re-evaluation condition
- document re-eval conditions for the Insta360 resume fix, the darwin
  auto-optimise-store workaround, and the youko USB-SATA bridge mitigations

* chore(workarounds): keep the Dirty Frag module blacklist as defence in depth

* chore(ai): correct the i915.enable_guc rationale (verified against the kernel)

* chore(darwin): drop the auto-optimise-store workaround (nix#7273 fixed)
2026-10-03 11:25:34 +08:00

62 lines
1.8 KiB
Nix

{
pkgs,
modulesPath,
...
}:
{
imports = [
(modulesPath + "/hardware/cpu/intel-npu.nix")
];
# Intel NPU support
hardware.cpu.intel.npu.enable = true;
# kvm virtualization support
boot.initrd.kernelModules = [ ];
boot.kernelModules = [
"kvm-intel"
# Provide a connected DRM output when the NVIDIA-attached monitors are off.
# Niri exposes it as Virtual-1 for headless Sunshine sessions.
"vkms"
];
boot.extraModprobeConfig = ''
options kvm_intel nested=1
# Create Virtual-1 as soon as vkms loads, including during normal physical sessions.
options vkms create_default_dev=1
'';
boot.extraModulePackages = [ ];
# Intel Graphics
# https://wiki.nixos.org/wiki/Intel_Graphics
services.xserver.videoDrivers = [ "modesetting" ];
hardware.graphics = {
enable = true;
extraPackages = with pkgs; [
# Required for modern Intel GPUs (Xe iGPU and ARC)
intel-media-driver # VA-API (iHD) userspace
vpl-gpu-rt # oneVPL (QSV) runtime
# Optional (compute / tooling):
intel-compute-runtime # OpenCL (NEO) + Level Zero for Arc/Xe
];
};
environment.sessionVariables = {
LIBVA_DRIVER_NAME = "iHD"; # Prefer the modern iHD backend
};
# May help if FFmpeg/VAAPI/QSV init fails (esp. on Arc with i915):
hardware.enableRedistributableFirmware = true;
# (dropped) `i915.enable_guc=3`: i915's `enable_guc` is a "dangerous" option
# (it taints the kernel), and since Alder Lake the driver already auto-enables
# HuC + GuC submission on non-TGL/RKL Gen12+ platforms -- including this Arrow
# Lake-S iGPU, where auto = `HuC | GuC submission` = 3. Re-add only if
# VAAPI/QSV init regresses.
# May help services that have trouble accessing /dev/dri (e.g., jellyfin/plex):
# users.users.<service>.extraGroups = [ "video" "render" ];
}