feat(install): #59 NVIDIA commented system.nix guidance
Some checks failed
Check / eval (push) Has been cancelled
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:
@@ -95,15 +95,6 @@ the Wi‑Fi card.” Does **not** rewrite the flake unless a later `--apply`
|
|||||||
is explicitly designed. Cost: extract script + package + man/README
|
is explicitly designed. Cost: extract script + package + man/README
|
||||||
pointer; V0–V1.
|
pointer; V0–V1.
|
||||||
|
|
||||||
### 59. Installer: NVIDIA commented system.nix guidance
|
|
||||||
Detection already adds `common-gpu-nvidia`; there is no
|
|
||||||
`nomarchy.hardware.nvidia.*` and hybrid/PRIME is wiki territory. When
|
|
||||||
NVIDIA is detected, emit a **commented** block in generated `system.nix`
|
|
||||||
(same style as ROCm/NPU) pointing at PRIME / powerManagement /
|
|
||||||
open-module and docs/HARDWARE.md §6 — not a full second stack. Cost:
|
|
||||||
install script strings; V0 + doc. Prefer this over first-class NVIDIA
|
|
||||||
options (`[big]` stays PROPOSED).
|
|
||||||
|
|
||||||
### 60. Battery / powerprofile: name-agnostic battery scan
|
### 60. Battery / powerprofile: name-agnostic battery scan
|
||||||
`power.nix` oneshot and menu/waybar globs use
|
`power.nix` oneshot and menu/waybar globs use
|
||||||
`/sys/class/power_supply/BAT*`. `nomarchy-battery-notify` correctly
|
`/sys/class/power_supply/BAT*`. `nomarchy-battery-notify` correctly
|
||||||
|
|||||||
@@ -17,6 +17,18 @@ Template:
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## 2026-07-10 — #59 NVIDIA commented system.nix guidance
|
||||||
|
- **Task:** NEXT #59 — when `common-gpu-nvidia` is selected, emit
|
||||||
|
commented PRIME/power/open-module guidance in installer-generated
|
||||||
|
system.nix (ROCm/NPU pattern).
|
||||||
|
- **Did:** `has_nvidia` from HW_PROFILES → patch JSON; `build_installer_region`
|
||||||
|
emits comment-only plain NixOS block + HARDWARE.md §6 pointer. Docs §6
|
||||||
|
product direction marked shipped. Closed #59.
|
||||||
|
- **Verified:** **V0** — patch-template smoke with nvidia true (region
|
||||||
|
contains hardware.nvidia.* comments + profile in flake); negative
|
||||||
|
(nvidia false) has neither; `bash -n` install script.
|
||||||
|
- **Next suggestion:** #60 BAT*-agnostic battery scan.
|
||||||
|
|
||||||
## 2026-07-10 — #62 whole-swap CSS self-containment CI gate
|
## 2026-07-10 — #62 whole-swap CSS self-containment CI gate
|
||||||
- **Task:** NEXT #62 — cheap gate that waybar.css defines every @color it
|
- **Task:** NEXT #62 — cheap gate that waybar.css defines every @color it
|
||||||
references (would have caught neon-glass) + preview/backgrounds present.
|
references (would have caught neon-glass) + preview/backgrounds present.
|
||||||
|
|||||||
@@ -228,10 +228,11 @@ force-load every GPU driver (avoids multi-driver panics). Proprietary
|
|||||||
NVIDIA on the live session is not the product focus; installed systems
|
NVIDIA on the live session is not the product focus; installed systems
|
||||||
use the profile.
|
use the profile.
|
||||||
|
|
||||||
**Product direction (queued):** when detection selects
|
**Product direction (shipped #59):** when `common-gpu-nvidia` is in
|
||||||
`common-gpu-nvidia`, emit a **commented** `system.nix` block with PRIME /
|
`hardwareProfile`, the installer emits a **commented** `system.nix` block
|
||||||
power / open-module pointers (same pattern as ROCm / NPU comments), not
|
with PRIME / power / open-module pointers (same pattern as ROCm / NPU
|
||||||
a full second NVIDIA stack unless a maintainer commits to testing.
|
comments). A full `nomarchy.hardware.nvidia.*` stack stays optional and
|
||||||
|
needs a maintainer + hardware-queue coverage.
|
||||||
|
|
||||||
## 7. Day-2: “my laptop is mostly fine, make it fully fine”
|
## 7. Day-2: “my laptop is mostly fine, make it fully fine”
|
||||||
|
|
||||||
|
|||||||
@@ -411,6 +411,10 @@ if [[ ${#HW_NOMARCHY[@]} -gt 0 ]]; then
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
fi
|
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
|
is_laptop=false
|
||||||
[[ " ${HW_PROFILES[*]:-} " == *" common-pc-laptop "* ]] && is_laptop=true
|
[[ " ${HW_PROFILES[*]:-} " == *" common-pc-laptop "* ]] && is_laptop=true
|
||||||
thermald=false
|
thermald=false
|
||||||
@@ -452,6 +456,7 @@ python3 "$SHARE/patch-template.py" "$FLAKE_DIR" <<PYJSON
|
|||||||
"amd": $has_amd,
|
"amd": $has_amd,
|
||||||
"fingerprint": $has_fp,
|
"fingerprint": $has_fp,
|
||||||
"cameraIr": $has_camera_ir,
|
"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)
|
"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,
|
"resumeOffset": $resume_json,
|
||||||
|
|||||||
@@ -117,7 +117,10 @@ def build_installer_region(v: dict) -> str:
|
|||||||
)
|
)
|
||||||
|
|
||||||
hw = v.get("hardware") or {}
|
hw = v.get("hardware") or {}
|
||||||
if any(hw.get(k) for k in ("intel", "amd", "fingerprint", "cameraIr", "npu")):
|
if any(
|
||||||
|
hw.get(k)
|
||||||
|
for k in ("intel", "amd", "fingerprint", "cameraIr", "npu", "nvidia")
|
||||||
|
):
|
||||||
lines.append(" # Hardware enablement (auto-detected).")
|
lines.append(" # Hardware enablement (auto-detected).")
|
||||||
if hw.get("intel"):
|
if hw.get("intel"):
|
||||||
lines.append(
|
lines.append(
|
||||||
@@ -151,6 +154,17 @@ def build_installer_region(v: dict) -> str:
|
|||||||
f" # nomarchy.hardware.npu.enable = true; # {vendor} NPU (experimental; userspace BYO)",
|
f" # nomarchy.hardware.npu.enable = true; # {vendor} NPU (experimental; userspace BYO)",
|
||||||
" # nomarchy.hardware.latestKernel = true; # if the NPU driver needs a newer kernel",
|
" # nomarchy.hardware.latestKernel = true; # if the NPU driver needs a newer kernel",
|
||||||
]
|
]
|
||||||
|
# NVIDIA: profile is in flake.nix (common-gpu-nvidia). Hybrid/PRIME
|
||||||
|
# knobs are plain NixOS — comment-only guidance, same pattern as ROCm.
|
||||||
|
if hw.get("nvidia"):
|
||||||
|
lines += [
|
||||||
|
" # NVIDIA: common-gpu-nvidia is in hardwareProfile (flake.nix).",
|
||||||
|
" # Hybrid/PRIME, power, open-module — plain NixOS; see docs/HARDWARE.md §6",
|
||||||
|
" # and https://wiki.nixos.org/wiki/Nvidia (bus IDs are machine-specific).",
|
||||||
|
" # hardware.nvidia.prime = { ... }; # offload/sync",
|
||||||
|
" # hardware.nvidia.powerManagement.enable = true; # suspend/resume",
|
||||||
|
" # hardware.nvidia.open = false; # true = open module (newer cards)",
|
||||||
|
]
|
||||||
|
|
||||||
if v.get("resumeOffset") is not None:
|
if v.get("resumeOffset") is not None:
|
||||||
root_uuid = nix_str(v["rootUuid"])
|
root_uuid = nix_str(v["rootUuid"])
|
||||||
|
|||||||
Reference in New Issue
Block a user