feat(hardware): nomarchy.hardware.* enablement beyond nixos-hardware
The nixos-hardware "common-*" profiles the installer selects cover the
basics (microcode, the Intel/AMD VA-API media stack, weekly fstrim), and
power.nix adds thermald + power-profiles-daemon. This adds the gap above
them, generically and detected at install time.
New modules/nixos/hardware.nix exposes a vendor-keyed nomarchy.hardware.*
surface — broadly-beneficial bits default ON when the vendor is detected
(opt-out), heavy/experimental bits behind opt-in toggles:
- intel.enable -> GuC/HuC (i915.enable_guc=3); intel.computeRuntime
(opt-in: intel-compute-runtime + vpl-gpu-rt)
- amd.enable -> amd_pstate=active + radeonsi VA-API env; amd.rocm.enable
+ amd.rocm.gfxOverride (opt-in: ROCm HIP/OpenCL)
- fingerprint.enable -> fprintd; fingerprint.pam (opt-in: login + sudo)
- npu.enable (opt-in/experimental) -> the in-kernel driver
(amdxdna/intel_vpu) keyed by vendor; userspace runtime is BYO
hardware-db.sh now detects Intel/AMD, a fingerprint reader (libfprint USB
vendor IDs) and an NPU (Intel VPU / AMD XDNA PCI IDs), emitting NOMARCHY
lines the installer bakes into system.nix — safe defaults active, opt-ins
commented. Audited against the commons to avoid double-setting.
Verified: flake check green; a toggles-on build has amd_pstate=active +
i915.enable_guc=3 in kernel-params and ships fprintd.service; detection
runs correctly on the (AMD Ryzen-AI) dev machine. On-hardware verification
of the AMD/NPU/Intel-compute runtime bits is still pending.
Docs: template commented examples, README option table, ROADMAP status.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -263,6 +263,22 @@ how to override it. Items marked ✓ are shipped.
|
||||
Complements nixos-hardware (model quirks) rather than replacing it; keep
|
||||
the detection in the installer's `hardware-db` so an installed machine
|
||||
bakes the right defaults, all overridable through `nomarchy.hardware.*`.
|
||||
- ✓ **Mechanism + broad seed shipped** (`modules/nixos/hardware.nix`): a
|
||||
vendor-keyed `nomarchy.hardware.*` surface (`intel`, `amd`, `fingerprint`,
|
||||
`npu`), `hardware-db.sh` extended to detect Intel/AMD, a fingerprint reader
|
||||
(libfprint USB vendor IDs) and an NPU (Intel VPU / AMD XDNA PCI IDs), and
|
||||
the installer bakes the matching toggles into `system.nix` — safe defaults
|
||||
active (GuC/HuC, amd-pstate, AMD VA-API env, fprintd), heavy/experimental
|
||||
opt-ins commented (Intel compute-runtime, ROCm, fingerprint PAM, NPU
|
||||
driver). Audited against the nixos-hardware commons so it only fills the
|
||||
gap above them — microcode / the media-driver VA-API stack / weekly fstrim
|
||||
already come from `common-cpu-*` / `common-gpu-*` / `common-pc-ssd`.
|
||||
Exercised live on the dev machine's detection (an AMD Ryzen-AI laptop: AMD
|
||||
+ fingerprint + NPU all detected) and a toggles-on build (`amd_pstate=active`
|
||||
+ `i915.enable_guc=3` in kernel-params, `fprintd.service` present).
|
||||
**Remaining: on-hardware verification of the runtime bits (AMD/NPU/Intel
|
||||
GPU-compute) — none are testable in CI or on the Intel Latitudes for the
|
||||
AMD paths.** SSD TRIM is intentionally left to `common-pc-ssd`.
|
||||
Worked example — ThinkPad T14s (Ryzen 7 PRO 7840U + Radeon 780M):
|
||||
- **GPU compute — ROCm:** the 780M is an RDNA3 iGPU (gfx1103) ROCm doesn't
|
||||
officially list, so it needs `HSA_OVERRIDE_GFX_VERSION=11.0.0`. Multi-GB
|
||||
|
||||
Reference in New Issue
Block a user