mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-11-13 12:13:46 +01:00
* chore(aquamarine): take the NPU stack from nixos-unstable-small * refactor(aquamarine): load the NPU driver via hardware.cpu.intel.npu Assisted-by: DeepSeek Harness (claude-opus-5-5)
32 lines
1.2 KiB
Nix
32 lines
1.2 KiB
Nix
{
|
|
pkgs,
|
|
pkgs-small,
|
|
...
|
|
}:
|
|
{
|
|
# The NPU serves ./asr.nix; the driver's compiler lookup is fixed by
|
|
# NixOS/nixpkgs#570230, which reached nixos-unstable-small first (WA-037).
|
|
hardware.cpu.intel.npu.enable = true;
|
|
nixpkgs.overlays = [ (_: _: { inherit (pkgs-small) intel-npu-driver; }) ];
|
|
|
|
# Ad-hoc CPU idle-power diagnostics: package power, C-state residency and
|
|
# wakeup attribution. Long-term RAPL export lives in the shared
|
|
# modules/nixos/base/power-monitoring.nix module.
|
|
environment.systemPackages = [
|
|
pkgs.linuxPackages_latest.cpupower
|
|
pkgs.linuxPackages_latest.turbostat
|
|
pkgs.powertop
|
|
];
|
|
|
|
# `powerManagement.cpuFreqGovernor = "powersave"` on x86 only selects the
|
|
# cpufreq governor. Intel P-state has a second knob, EPP, which biases the
|
|
# hardware between performance and power before the governor acts. Keep the
|
|
# existing powersave governor, but use the power-oriented EPP for this host.
|
|
#
|
|
# `boot.kernel.sysfs` is NixOS's native, declarative interface for sysfs
|
|
# attributes. It waits for the cpufreq attribute and writes it idempotently,
|
|
# so no private cpupower systemd service is needed.
|
|
boot.kernel.sysfs.devices.system.cpu."cpu[0-9]*".cpufreq.energy_performance_preference =
|
|
"balance_power";
|
|
}
|