feat: centralize Trilium web and MCP on Vega #100
No reviewers
Labels
No labels
host:electra
host:fleet
host:lyra
host:vega
host:vega
phase:cutover
phase:deploy
phase:mcp
phase:module
phase:packaging
phase:prep
phase:validation
project:attic-postgres-lyra-rollout
project:auto-update-reliability
project:declarative-purity-cleanup
project:external-review
project:host-facts-refactor
project:lyra-nixos-deploy
project:lyra-service-stack-migration
project:nebula-mesh-network
project:security-hardening
project:service-stack-migration
project:vega-sillytavern-cutover
service:auto-update
service:mem0
service:sillytavern
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
nimmo/nixos-config!100
Loading…
Reference in a new issue
No description provided.
Delete branch "issue-99-trilium-vega-mcp"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
triliumnext-mcppath and update docsValidation
nix flake checkNotes
Automated code review
Reviewed commit:
e23646dc789ae09458deab90ebf97bf528049263Verdict: Ready to merge
No blocking or important findings were retained, and deterministic checks passed. Suggestions remain advisory.
Overall assessment
Centralizes Trilium web and MCP to Vega, retiring the legacy Lyra-hosted gateway service. Updates AI client profiles to use the shared ETAPI token directly for MCP authentication, enforces explicit per-host URL configuration with clear failure messages, and removes obsolete secrets and module imports. Documentation and NTFY monitoring lists are updated accordingly.
Blocking findings
None.
Important findings
None.
Suggestions
throw "profiles.aiDesktop/ai-agents requires nixosConfig.trilium.clientUrl to be set explicitly.";
Impact: Minor cosmetic issue in runtime error output for misconfigured hosts; references the wrong profile name which may confuse operators debugging configuration failures.
Suggested fix: Correct the string to "profiles.ai-agents requires nixosConfig.trilium.clientUrl to be set explicitly.".
Tests and validation
Questions
Review limitations
Diff coverage
README.md: reviewed — included in a context-limited batchhosts/electra/default.nix: reviewed — included in a context-limited batchhosts/lena/default.nix: reviewed — included in a context-limited batchhosts/lyra/default.nix: reviewed — included in a context-limited batchhosts/vega/default.nix: reviewed — included in a context-limited batchmodules/common/base.nix: reviewed — included in a context-limited batchmodules/common/default-config.nix: reviewed — included in a context-limited batchmodules/profiles/ai-agents.nix: reviewed — included in a context-limited batchmodules/profiles/ai-desktop.nix: reviewed — included in a context-limited batchmodules/services/trilium-mcp.nix: reviewed — included in a context-limited batchsecrets/README.md: reviewed — included in a context-limited batchsecrets/trilium.yaml: reviewed — included in a context-limited batchReview metadata
Addressing the automated review findings:
secrets/trilium.yamlalready containstrilium/etapi-tokenand still retains the legacytrilium/mcp-gateway-token, so the new client secret reference is valid and there is no pending secret-file migration for this branch.triliumnext-mcppath can be re-enabled without forcing a secret rotation.nixosConfig.trilium.clientUrland says it must be overridden for non-Vega deployments. I will push that next.Addressed the latest automated review findings in commit
062d39d.Changes made:
nixosConfig.triliumMcpmodule/import path entirely, includingmodules/services/trilium-mcp.nixtrilium/mcp-gateway-tokenentry fromsecrets/trilium.yamland from the docsnixosConfig.trilium.clientUrlfrom a shared hardcoded default to an explicit per-host setting on the current AI hosts (electra,lena,lyra,vega)nixosConfig.trilium.clientUrlexplicitlyValidation:
nix flake checkpassed after these changesThat resolves the two important findings directly in the tree rather than just documenting intent.
Addressed the latest review finding in commit
e23646d.nixosConfig.trilium.clientUrlexplicitly at URL construction time instead of interpolating a null valuethrowmessage in bothmodules/profiles/ai-agents.nixandmodules/profiles/ai-desktop.nix, so misconfigured hosts get an actionable error instead of a null coercion failurenix flake checkpassed again after the changeApplied the final advisory cleanup in commit
8af16c0.profiles.ai-agentstypo in the unsetnixosConfig.trilium.clientUrlerror messagenix flake checkpassed again after the change