GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — sync-models user service fails from Nix store layout: resolves opencode config to /nix/.opencode/opencode.jsonc · Issue #591 · developing-today/code

sync-models user service fails from Nix store layout: resolves opencode config to /nix/.opencode/opencode.jsonc #591

New issue
Copy link
New issue
Copy link
Closed
#592
Closed
sync-models user service fails from Nix store layout: resolves opencode config to /nix/.opencode/opencode.jsonc#591
#592
Copy link
Assignees
dezren39
Labels
app/opencode-configOpenCode configuration under .opencode/ and the root configarea/homeHome-manager / user environment configurationkind/bugSomething isn't working (prefixed form of the classic bug label)

Description

@dezren39
dezren39
opened on Oct 22, 2026
Issue body actions

Symptom

The sync-models systemd user service on amd (Framework laptop) fails on every run. Latest journal evidence (2026-10-22 00:44:49 CDT, journalctl --user -u sync-models):

[sync-models] Discovered 22 models from Antigravity Language Server
[sync-models] Discovering Codex models...
[sync-models] Discovered 9 models from Codex cache
[sync-models] Error: /nix/.opencode/opencode.jsonc does not exist!
sync-models.service: Main process exited, code=exited, status=1/FAILURE

Discovery works fine — the failure is purely in resolving the config file the script syncs models into.

Root cause

bin/sync-models.mjs resolves the config relative to its own location:

const ROOT_DIR = path.resolve(import.meta.dirname, '..');
const OPENCODE_CONFIG_PATH = path.join(ROOT_DIR, '.opencode/opencode.jsonc');

That assumption holds in a repo checkout (<repo>/bin → <repo>/.opencode/opencode.jsonc). But the home-manager unit (home/common/default.nix, systemd.user.services.sync-models) runs the file from the Nix store: node ${../../bin/sync-models.mjs} interpolates to a lone store file (/nix/store/<hash>-sync-models.mjs), so import.meta.dirname is /nix/store, ROOT_DIR becomes /nix, and the script looks for /nix/.opencode/opencode.jsonc — which never exists.

(POLICY_PATH has the same store-layout problem, but its loader already tolerates a missing file and falls back to empty defaults, so it degrades silently instead of failing.)

Fix

Resolve the config path in this order:

  1. $OPENCODE_CONFIG_PATH env override, if set.
  2. The repo-local .opencode/opencode.jsonc when it exists (in-checkout runs keep today's behavior).
  3. The deployed user config ~/.config/opencode/opencode.jsonc — the file the service actually maintains, and the same file the opencode-config-normalize path unit already watches.

Acceptance

  • Installed (store-layout) run no longer dies at the config-exists check; it targets ~/.config/opencode/opencode.jsonc.
  • In-repo run behavior unchanged.
  • Verified by a dry-run from a store-like layout (script copied alone into a bare directory) passing the config resolution step.

Activity

  1. github-actions
    assigned
    dezren39
    on Oct 22, 2026
  2. dezren39
    closed this as completedin #592on Oct 23, 2026
  3. developing-today-fleet commented on Nov 24, 2026

    @developing-today-fleet
    developing-today-fleetBot
    on Nov 24, 2026 – with developing.today fleet
    Contributor
    More actions

    AUDIT-7 Lane 2 slice 3 — closing evidence. Verified against the issue body and merged implementation PR(s):

    • PR #592 — fix(bin): sync-models resolves deployed user config when run from the Nix store (merged 2026-10-23)

    The issue had zero comments in the fresh pre-action read; this comment records the missing close evidence.

  4. dezren39
    added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    app/opencode-configOpenCode configuration under .opencode/ and the root config
    area/homeHome-manager / user environment configuration
    on Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dezren39
    dezren39

Labels

app/opencode-configOpenCode configuration under .opencode/ and the root configarea/homeHome-manager / user environment configurationkind/bugSomething isn't working (prefixed form of the classic bug label)

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.