refactor(hosts): derive shared policy from host facts #162

Merged
nimmo merged 1 commit from issue-17-host-facts into main 2026-08-12 11:22:54 +01:00
Owner

Summary

  • add explicit nixosConfig.host.gpu.vendors metadata and show it in just inventory
  • install llmfit only on hosts declaring a local GPU
  • derive Home Manager server policy from the existing nixosConfig.host.role
  • align the Proxmox VM location metadata and document the inventory schema

Decision

Refs #17. This deliberately does not introduce nixosConfig.hostClass: the existing host.role is the durable shared classification required by Home Manager, while gpu.vendors models a separate hardware capability. The result remains explicit and avoids hidden profile selection.

Validation

  • nix fmt
  • nix flake check
  • just inventory
  • evaluated llmfit policy: enabled only for Electra and Lyra

Deployment evidence still required

Canary a role-bearing host and confirm its Home Manager activation still applies the expected headless/desktop policy. Do not close #17 until that evidence is recorded.

## Summary - add explicit `nixosConfig.host.gpu.vendors` metadata and show it in `just inventory` - install `llmfit` only on hosts declaring a local GPU - derive Home Manager server policy from the existing `nixosConfig.host.role` - align the Proxmox VM location metadata and document the inventory schema ## Decision Refs #17. This deliberately does **not** introduce `nixosConfig.hostClass`: the existing `host.role` is the durable shared classification required by Home Manager, while `gpu.vendors` models a separate hardware capability. The result remains explicit and avoids hidden profile selection. ## Validation - `nix fmt` - `nix flake check` - `just inventory` - evaluated `llmfit` policy: enabled only for Electra and Lyra ## Deployment evidence still required Canary a role-bearing host and confirm its Home Manager activation still applies the expected headless/desktop policy. Do not close #17 until that evidence is recorded.
refactor(hosts): derive shared policy from host facts
All checks were successful
Build and Push Attic Cache / test (pull_request) Successful in 1m14s
Build and Push Attic Cache / build (pull_request) Has been skipped
Build and Push Attic Cache / pin-lifecycle (pull_request) Has been skipped
Build and Push Attic Cache / remediate (pull_request) Has been skipped
AI pull-request review / review (pull_request) Successful in 3m15s
614937a16e
Author
Owner

Automated-review status: ai-review.yml ran but failed before posting any findings because its Ollama response parser received malformed JSON (Expecting ":" delimiter). The normal PR workflow completed successfully. This is reviewer infrastructure failure, not feedback against the change; the branch remains validated with nix flake check, just inventory, and the targeted llmfit policy evaluation. A Forgejo API rerun is not available, so no unrelated branch change has been made.

Automated-review status: `ai-review.yml` ran but failed before posting any findings because its Ollama response parser received malformed JSON (`Expecting ":" delimiter`). The normal PR workflow completed successfully. This is reviewer infrastructure failure, not feedback against the change; the branch remains validated with `nix flake check`, `just inventory`, and the targeted `llmfit` policy evaluation. A Forgejo API rerun is not available, so no unrelated branch change has been made.
Author
Owner

Automated code review

Reviewed commit: 614937a16ec270ae95cae74008952c48f98f8980

Verdict: Ready to merge

No blocking or important findings were retained, and deterministic checks passed. Suggestions remain advisory.

Overall assessment

Refactors host policy by introducing explicit gpu.vendors metadata, derives Home Manager's isServer flag from nixosConfig.host.role, moves conditional llmfit installation to a shared module, updates inventory tooling and documentation accordingly. Changes are scoped correctly and align with stated goals.

Blocking findings

None.

Important findings

None.

Suggestions

None.

Tests and validation

  • No configured deterministic checks.

Questions

None.

Review limitations

  • Review is based solely on the provided static diff; actual Nix evaluation, nix flake check output, and live deployment behavior were not executed.
  • Cannot verify runtime Home Manager policy derivation or GPU capability detection without access to the build environment or target hosts.

Diff coverage

  • README.md: reviewed — included in a context-limited batch
  • flake.nix: reviewed — included in a context-limited batch
  • hosts/chaos/default.nix: reviewed — included in a context-limited batch
  • hosts/cosmos/default.nix: reviewed — included in a context-limited batch
  • hosts/electra/default.nix: reviewed — included in a context-limited batch
  • hosts/lyra/default.nix: reviewed — included in a context-limited batch
  • justfiles/hosts.just: reviewed — included in a context-limited batch
  • modules/common/default-config.nix: reviewed — included in a context-limited batch
  • modules/common/system.nix: reviewed — included in a context-limited batch
Review metadata
  • Reviewer: forgejo-ai-review v1
  • Model: qwen3.6:35b-a3b-q8_0
  • Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, README.md
  • Commits considered: 1
  • Previous automated review: none found
  • Findings: 0
<!-- forgejo-ai-review:v1 --> ## Automated code review Reviewed commit: `614937a16ec270ae95cae74008952c48f98f8980` ## Verdict: Ready to merge No blocking or important findings were retained, and deterministic checks passed. Suggestions remain advisory. ### Overall assessment Refactors host policy by introducing explicit `gpu.vendors` metadata, derives Home Manager's `isServer` flag from `nixosConfig.host.role`, moves conditional `llmfit` installation to a shared module, updates inventory tooling and documentation accordingly. Changes are scoped correctly and align with stated goals. ### Blocking findings None. ### Important findings None. ### Suggestions None. ### Tests and validation - No configured deterministic checks. ### Questions None. ### Review limitations - Review is based solely on the provided static diff; actual Nix evaluation, `nix flake check` output, and live deployment behavior were not executed. - Cannot verify runtime Home Manager policy derivation or GPU capability detection without access to the build environment or target hosts. ### Diff coverage - `README.md`: **reviewed** — included in a context-limited batch - `flake.nix`: **reviewed** — included in a context-limited batch - `hosts/chaos/default.nix`: **reviewed** — included in a context-limited batch - `hosts/cosmos/default.nix`: **reviewed** — included in a context-limited batch - `hosts/electra/default.nix`: **reviewed** — included in a context-limited batch - `hosts/lyra/default.nix`: **reviewed** — included in a context-limited batch - `justfiles/hosts.just`: **reviewed** — included in a context-limited batch - `modules/common/default-config.nix`: **reviewed** — included in a context-limited batch - `modules/common/system.nix`: **reviewed** — included in a context-limited batch <details><summary>Review metadata</summary> - Reviewer: forgejo-ai-review v1 - Model: qwen3.6:35b-a3b-q8_0 - Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, README.md - Commits considered: 1 - Previous automated review: none found - Findings: 0 </details>
nimmo merged commit 618ec60496 into main 2026-08-12 11:22:54 +01:00
nimmo deleted branch issue-17-host-facts 2026-08-12 11:22:55 +01:00
Sign in to join this conversation.
No reviewers
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
nimmo/nixos-config!162
No description provided.