refactor: split AI desktop runtime profile #121

Merged
nimmo merged 2 commits from feat/decompose-ai-desktop into main 2026-07-29 11:23:48 +01:00
Owner

Closes #115

Make ai-desktop.nix a focused composition point. Extract the coupled OpenCode/Paseo runtime into ai-runtime.nix, including the OpenCode system service, client/MCP configuration, SOPS-backed credentials, Tea setup, Paseo wrapper, and Home Manager integration. Keep shared AI client integration in ai-agents.nix and document the resulting ownership.

Validation:

  • nix fmt -- --ci
  • nix flake check
  • nix build .#nixosConfigurations.electra.config.system.build.toplevel --no-link
  • nix build .#nixosConfigurations.vega.config.system.build.toplevel --no-link
Closes #115 Make ai-desktop.nix a focused composition point. Extract the coupled OpenCode/Paseo runtime into ai-runtime.nix, including the OpenCode system service, client/MCP configuration, SOPS-backed credentials, Tea setup, Paseo wrapper, and Home Manager integration. Keep shared AI client integration in ai-agents.nix and document the resulting ownership. Validation: - nix fmt -- --ci - nix flake check - nix build .#nixosConfigurations.electra.config.system.build.toplevel --no-link - nix build .#nixosConfigurations.vega.config.system.build.toplevel --no-link
refactor: split AI desktop runtime profile
All checks were successful
Build and Push Attic Cache / test (pull_request) Successful in 56s
Build and Push Attic Cache / build (pull_request) Has been skipped
AI pull-request review / review (pull_request) Successful in 4m10s
2bb69d0413
Author
Owner

Automated code review

Reviewed commit: 7914f202bd5676ba0d5d3f52f594b74072196dbe

Verdict: Ready to merge

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

Overall assessment

Refactors the AI desktop profile by extracting the coupled OpenCode/Paseo runtime, SOPS-backed credentials, systemd services, and Home Manager wiring into a new ai-runtime.nix module. ai-desktop.nix is reduced to a focused composition point that imports ai-agents.nix and ai-runtime.nix, while documentation and architecture rules are updated to reflect the new ownership boundaries.

Blocking findings

None.

Important findings

None.

Suggestions

  • Large coupled module size in ai-runtime.nix (modules/profiles/ai-runtime.nix:1; medium confidence)
    The new file contains 431 lines combining OpenCode daemon/client configuration, Paseo runtime packaging, SOPS-backed credentials, systemd service definitions, and Home Manager activation scripts.
    Impact: High coupling increases maintenance overhead and makes isolated testing or independent updates for components like Paseo or OpenCode more difficult.
    Suggested fix: Consider splitting ai-runtime.nix into smaller, focused modules (e.g., separating the Paseo desktop runtime from the OpenCode service/client) if future changes require independent versioning or configuration.

Tests and validation

  • No configured deterministic checks.

Questions

  • Given that ai-runtime.nix contains 431 lines of configuration, is there an intention to further split it into smaller modules (e.g., separating Paseo runtime from OpenCode service/client), or is it intended to remain the single authoritative owner for this coupled runtime contract?

Review limitations

  • Review is based solely on the provided diff and repository documentation. Nix evaluation, package resolution, and deployment behavior were not executed.
  • Cannot verify SOPS secret availability or host-specific option overrides without access to the full flake evaluation context.

Diff coverage

  • README.md: reviewed — included in a context-limited batch
  • modules/profiles/ai-desktop.nix: reviewed — included in a context-limited batch
  • modules/profiles/ai-runtime.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: 2
  • Previous automated review: updated
  • Findings: 1
<!-- forgejo-ai-review:v1 --> ## Automated code review Reviewed commit: `7914f202bd5676ba0d5d3f52f594b74072196dbe` ## Verdict: Ready to merge No blocking or important findings were retained, and deterministic checks passed. Suggestions remain advisory. ### Overall assessment Refactors the AI desktop profile by extracting the coupled OpenCode/Paseo runtime, SOPS-backed credentials, systemd services, and Home Manager wiring into a new `ai-runtime.nix` module. `ai-desktop.nix` is reduced to a focused composition point that imports `ai-agents.nix` and `ai-runtime.nix`, while documentation and architecture rules are updated to reflect the new ownership boundaries. ### Blocking findings None. ### Important findings None. ### Suggestions - **Large coupled module size in ai-runtime.nix** (modules/profiles/ai-runtime.nix:1; medium confidence) The new file contains 431 lines combining OpenCode daemon/client configuration, Paseo runtime packaging, SOPS-backed credentials, systemd service definitions, and Home Manager activation scripts. Impact: High coupling increases maintenance overhead and makes isolated testing or independent updates for components like Paseo or OpenCode more difficult. Suggested fix: Consider splitting `ai-runtime.nix` into smaller, focused modules (e.g., separating the Paseo desktop runtime from the OpenCode service/client) if future changes require independent versioning or configuration. ### Tests and validation - No configured deterministic checks. ### Questions - Given that `ai-runtime.nix` contains 431 lines of configuration, is there an intention to further split it into smaller modules (e.g., separating Paseo runtime from OpenCode service/client), or is it intended to remain the single authoritative owner for this coupled runtime contract? ### Review limitations - Review is based solely on the provided diff and repository documentation. Nix evaluation, package resolution, and deployment behavior were not executed. - Cannot verify SOPS secret availability or host-specific option overrides without access to the full flake evaluation context. ### Diff coverage - `README.md`: **reviewed** — included in a context-limited batch - `modules/profiles/ai-desktop.nix`: **reviewed** — included in a context-limited batch - `modules/profiles/ai-runtime.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: 2 - Previous automated review: updated - Findings: 1 </details>
refactor: remove unused AI runtime binding
All checks were successful
Build and Push Attic Cache / test (pull_request) Successful in 38s
Build and Push Attic Cache / build (pull_request) Has been skipped
AI pull-request review / review (pull_request) Successful in 3m23s
7914f202bd
nimmo merged commit 9684f59221 into main 2026-07-29 11:23:48 +01:00
nimmo deleted branch feat/decompose-ai-desktop 2026-07-29 11:24:20 +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!121
No description provided.