feat(install): #59 NVIDIA commented system.nix guidance
Some checks failed
Check / eval (push) Has been cancelled

When hardwareProfile includes common-gpu-nvidia, emit a comment-only
plain NixOS block (PRIME / powerManagement / open-module) in the
installer region of system.nix — same pattern as ROCm/NPU opt-ins.
HARDWARE.md §6 product direction marked shipped. Close #59.

Verified: V0 (patch-template smoke + negative + bash -n).
This commit is contained in:
Bernardo Magri
2026-07-10 08:30:51 +01:00
parent f09042adbe
commit 09388196a9
5 changed files with 37 additions and 14 deletions

View File

@@ -411,6 +411,10 @@ if [[ ${#HW_NOMARCHY[@]} -gt 0 ]]; then
esac
done
fi
# NVIDIA is a nixos-hardware MODULE only (no nomarchy.hardware.nvidia.*) —
# still emit commented plain-NixOS guidance in system.nix (BACKLOG #59).
has_nvidia=false
[[ " ${HW_PROFILES[*]:-} " == *" common-gpu-nvidia "* ]] && has_nvidia=true
is_laptop=false
[[ " ${HW_PROFILES[*]:-} " == *" common-pc-laptop "* ]] && is_laptop=true
thermald=false
@@ -452,6 +456,7 @@ python3 "$SHARE/patch-template.py" "$FLAKE_DIR" <<PYJSON
"amd": $has_amd,
"fingerprint": $has_fp,
"cameraIr": $has_camera_ir,
"nvidia": $has_nvidia,
"npu": $(if [[ -n "$NPU_VENDOR" ]]; then printf '%s' "$NPU_VENDOR" | python3 -c 'import json,sys; print(json.dumps(sys.stdin.read().rstrip("\n")))'; else echo null; fi)
},
"resumeOffset": $resume_json,