Skip to content

nixos: bring Grist, Kaneo, Pad, ready-for-agent in as flake services — the last hand-run PM servers #1752

Open

Description

@dezren39

Status quo (verified 2026-10-28)

The flake's nixos/services/ defines cloudflared, flatpak, id-mail, and pm-stack (aggregator, projector, git-sync, projector-reconcile). Four PM-stack servers are NOT in the flake at all (zero mentions in nixos/ or home/): they run as hand-made units/containers on the laptop, are not enabled as boot services, and would not come back on their own after a reboot:

  • Grist (:8484) — roadmap table + registers; its own document storage.
  • Kaneo (:5173) — task board; Postgres-backed (see code#1514: its database has no backup routine, docker volume is the only copy).
  • Pad (:7777) — notes; token expires 2027-01-22.
  • ready-for-agent (:6056) — agent intake endpoint.

What to build

  • One nixos/services module per server (or one pm-apps module) in this flake, following the pm-stack module's shape: service runs from the primary checkout or a pinned package, state under ~/.local/state// (or the server's existing data home — do NOT orphan Kaneo's Postgres data or Grist's docs; migrate or bind the existing data in place).
  • Enabled at switch like the rest of the fleet; hand units retired in the same change that proves the NixOS unit serves.
  • Backup coverage for each server's data lands with or before the move (code#1514, code#1516).

Acceptance

  • After a NixOS switch, all four answer on their ports with their existing data intact.
  • A laptop reboot brings all four back with no hand step.
  • The hand-made units/containers are removed; 'systemctl --user is-enabled' is no longer the thing standing between the stack and a reboot.

Raised by Drew 2026-10-28 ('what is status for implementing nixos services for all the servers?'). Related: code#1199 (projector deploy — done interim, NixOS at the switch), code#1514, code#1516, code#1744 (shared-schema direction for these servers' data).

Acceptance criteria

Activity

  1. added
    enhancementNew feature or request
    nextOrg Project gate: queued next — orchestrator adds to the board
    on Oct 28, 2026
  2. developing-today commented on Oct 28, 2026

    @developing-today
    Contributor
  3. added
    kind/featureNew feature or capability request
    source/humanFiled directly by a human
    priority/normalOrdinary priority (the default)
    effort/lLarge: multi-day or open-ended; expect staged check-ins
    area/nixosNixOS modules and machine configuration
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    on Oct 28, 2026
  4. dezren39 commented on Oct 28, 2026

    @dezren39
    MemberAuthor

    Intake review

    — fleet monitor intake pass, 2026-10-28

  5. 16 remaining items

  6. added
    queue/queuedHas a queued task in the Supabase agent queue
    task/triageQueue packet kind: verify, reproduce, and route this item
    on Nov 3, 2026
  7. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    state: triaged (coverage pass)
    Coverage pass 2026-11-03: reviewed in the fleet-wide per-issue pass (drift / overlap / already-handled / stale / blockers / ordering). Verdict: still live; queued in repo-health-code-pilot as triage at priority 40 (priority/normal). If this is already handled at current main, the triage closes it with evidence; if it needs splitting, the triage files the split.
    Found via: coverage pass 2026-11-03

  8. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 3, 2026
  9. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

  10. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done (triage) — escalated for two Drew decisions

    Fresh verification (2026-11-03 ~14:56Z, origin/main 91c3b19 + live laptop probe)

    • All four servers answer: Grist :8484 → 302, Kaneo :5173 → 200, Pad :7777 → 200, ready-for-agent :6056 → 200.
    • Grist + Pad are NixOS services: nixos/services/pm-apps/default.nix declares them as oci-containers on their original docker volumes; docker-pm-grist.service / docker-pm-pad.service are enabled + active (containers pm-grist up 4d, pm-pad up 4d healthy). services.pm-apps.enable = true in nixos/hosts/default.nix.
    • ready-for-agent is a NixOS service: declared as a user unit in the same pm-apps module; enabled + active.
    • Kaneo + its Postgres are deliberately NOT NixOS-declared. The pm-apps module header (at current main) records why: the 2026-11-01 attempt fought the pm-stack compose stack and ran two Postgres postmasters on the one pm-stack_postgres_data volume; the duplicate declarations were removed the same day (commit b19a53c). Today exactly one Postgres exists (pm-stack-postgres-1, healthy, up 46h) and Kaneo is compose-managed via the pm-stack module's pm-kaneo.service + self-heal timer (user units, active). The module header states the open point verbatim: completing the migration "would mean disabling the pm-stack compose units first and planning the cutover; until that decision is made, compose is the single manager for both."
    • Reboot proof is still missing: the laptop last booted 2026-10-26 07:15 CST — before the pm-apps module landed (2026-11-01). Everything running today was started by the switch, not by a boot, so the acceptance line "a laptop reboot brings all four back with no hand step" is unproven.
    • Backups still open: issue pm-stack databases (Kaneo Postgres, Grist, Pad) have no backup routine — docker volumes are the only copy #1514 and issue audit(backups): 2026-10-27 coverage audit — aggregator offsite unproven, Kaneo/atlas gaps, NixOS backup service directive #1516 both verified OPEN today; they already track the backup acceptance item, so no new task was filed for them here.
    • Side observation: the laptop primary clone ~/git/code cannot fast-forward — its local main carries a repo-keeper snapshot commit (3e59c84dd, 2026-11-03 08:27 CST) and sits 45 commits behind origin/main. Left untouched per the primary-clone rule; this is already tracked as issue laptop-repo-keeper: snapshot commits on the primary's main diverge it from origin and break deploys #2496.

    Decisions for Drew (substance, per the surfacing rule)

    1. Kaneo/Postgres end-state. Option A — approve a planned NixOS cutover task: disable the pm-stack compose units first, cut Kaneo + Postgres over to pm-apps oci-containers in one window, verify data (2 workspaces / 1 project / 1954 tasks as of task 5041's count) before retiring compose. This satisfies this issue's acceptance as written, but touches the only copy of Kaneo's Postgres data, so it wants a planned window, not an opportunistic fix. Option B — rule that compose-managed under the pm-stack module counts as "declared in the flake" (the units and timer are NixOS-declared; only the containers are compose-run) and amend this issue's acceptance accordingly. Recommendation: Option A, scheduled once, because the dual-manager fight recurs as a risk for as long as two systems can start the same stack — but it should be its own planned task, which is why none was enqueued ungated today.
    2. Reboot proof. Pick any reboot window for the laptop; after it, any worker can verify all four ports answer with no hand step and close that acceptance line. No reboot was forced from this triage.

    Once Drew rules on (1), the follow-up is mechanical: a gated cutover task (Option A) or an acceptance amendment + closure review (Option B). Task 7727 completes as triaged.

  11. added
    user/escalatedQueue or user escalation state
    and removed
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/nixosNixOS modules and machine configurationeffort/lLarge: multi-day or open-ended; expect staged check-insenhancementNew feature or requestkind/featureNew feature or capability requestmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addednextOrg Project gate: queued next — orchestrator adds to the boardpriority/normalOrdinary priority (the default)source/humanFiled directly by a humantask/triageQueue packet kind: verify, reproduce, and route this itemuser/escalatedQueue or user escalation state

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions