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 — Nix desktop arms the production auto-updater · Issue #52122 · anomalyco/opencode

Nix desktop arms the production auto-updater #52122

New issue
Copy link
New issue
Copy link
Open
Open
Nix desktop arms the production auto-updater#52122
Copy link
Assignees
Hona
Labels
reproduced

Description

@jerome-benoit
jerome-benoit
opened on Sep 29, 2026
Issue body actions

Description

A desktop installed from Nix has the production auto-updater enabled, so it can be offered a released binary over the package its distribution installed.

The Nix build sets OPENCODE_CHANNEL=prod, and the gate is app.isPackaged && CHANNEL !== "dev" (packages/desktop/src/main/constants.ts). The packaged app-update.yml points at the public feed:

provider: generic
url: https://opencode.ai/update/api/latest/desktop/opencode/
channel: latest

This predates the nix packaging rewrite; it was not visible while the Nix desktop build did not complete.

Plugins

None

OpenCode version

Affected source: 2.0.19+c977050030

Steps to reproduce

  1. nix build .#packages.x86_64-linux.opencode-desktop (needs the nix/hashes.json override from node_modules FOD hash is calibrated against one bun version — breaks with any other #49063).
  2. cat $out/opt/opencode-desktop/resources/app-update.yml → the public update URL above.
  3. nix derivation show $(nix eval --raw .#packages.x86_64-linux.opencode-desktop.drvPath) → OPENCODE_CHANNEL = 'prod'.

Screenshot and/or share link

Not applicable; outputs included above.

Operating System

Linux x86_64, nixpkgs 26.11, nix 2.34.8

Terminal

Not applicable, the reproduction is command line only.

Reacted by Carter McBride

Activity

  1. github-actions
    assigned
    Hona
    on Sep 29, 2026
  2. github-actions
    added
    needs:complianceThis means the issue will auto-close after 2 hours.
    on Sep 29, 2026
  3. github-actions commented on Sep 29, 2026

    @github-actions
    github-actionsBot
    on Sep 29, 2026 – with GitHub Actions
    Contributor
    More actions

    This issue doesn't fully meet our contributing guidelines.

    What needs to be fixed:

    • Please use the Bug Report template and include its required Description field with the issue details. The current body uses “What happens” instead, so the required Description field is missing.

    Please edit this issue to address the above within 2 hours, or it will be automatically closed.

    If you believe this was flagged incorrectly, please let a maintainer know.

  4. jerome-benoit
    changed the title [-]nix: the Nix desktop arms the production auto-updater[/-] [+]Nix desktop arms the production auto-updater[/+] on Sep 29, 2026
  5. github-actions commented on Sep 29, 2026

    @github-actions
    github-actionsBot
    on Sep 29, 2026 – with GitHub Actions
    Contributor
    More actions

    Thanks for updating the issue. It still needs to use the Bug Report template's required Description field. The issue has useful reproduction steps and system details, but the current body has no Description field. Please add the details under that required field.

  6. github-actions
    removed
    needs:complianceThis means the issue will auto-close after 2 hours.
    on Sep 29, 2026
  7. github-actions commented on Sep 29, 2026

    @github-actions
    github-actionsBot
    on Sep 29, 2026 – with GitHub Actions
    Contributor
    More actions

    Thanks for updating the issue. The required Description field and useful reproduction details are now included.

  8. carterworks
    added a commit that references this issue on Oct 13, 2026

    fix(nix): stop the Nix desktop build from self-updating

    a3e2b6a
  9. opencodejr commented on Oct 28, 2026

    @opencodejr
    opencodejrBot
    on Oct 28, 2026
    Contributor
    More actions

    Thanks for the detailed report. I checked this against the source, not with a real nix build (no Nix in this sandbox), and it holds on the latest dev (86ce19d96), with one difference from your setup.

    • Channel: in upstream nix/, OPENCODE_CHANNEL = "prod" is set only in the CLI derivation (nix/opencode.nix). nix/desktop.nix doesn't inherit or set it, so the upstream desktop build falls back to the dev channel, and its app-update.yml points at https://opencode.ai/update/api/dev/desktop/opencode/. With OPENCODE_CHANNEL=prod, as in your derivation, it gives exactly the public latest feed you quoted. c977050030 isn't in upstream dev history, so your tree may differ there.
    • Gate on v2.0.19: it was app.isPackaged && CHANNEL !== "dev", so an upstream Nix desktop on the dev channel had the updater off.
    • Gate on current dev: since refactor(app): move GUI features into built-in extensions #52369 it is just build.packaged (packages/gui-plugins/src/updater/main.ts). The Nix wrapper sets ELECTRON_FORCE_IS_PACKAGED=1, so a Nix-built desktop now checks for updates at startup and every 10 minutes, whichever channel it was built with.

    The script below prints the feed the desktop config resolves with and without OPENCODE_CHANNEL=prod, and shows the updater gate.

    Related:

    • feat(desktop): honor OPENCODE_DISABLE_AUTOUPDATE in the updater #55155: open PR that makes the desktop updater honor OPENCODE_DISABLE_AUTOUPDATE and sets it in the Nix desktop wrapper
    • Updater offers in-app updates for Nix store installs; taking it breaks the running session #54022: the same problem for the CLI/TUI updater on Nix installs (fix(nix): disable the self-updater in the flake build #57979 pending)
    • Nix desktop ships an app version that does not match its bundled CLI #52121: another Nix desktop packaging issue (app version vs. bundled CLI)
    Reproduction script (nix-channel.sh)
    #!/usr/bin/env bash
    # Evaluates which channel/update feed the desktop build resolves under the environment
    # nix/desktop.nix provides (it does not set OPENCODE_CHANNEL), versus OPENCODE_CHANNEL=prod.
    set -euo pipefail
    REPO=${REPO:-/workspace/repo}
    cd "$REPO/packages/desktop"
    echo "nix/desktop.nix mentions OPENCODE_CHANNEL: $(grep -c OPENCODE_CHANNEL "$REPO/nix/desktop.nix" || true)"
    echo "nix/opencode.nix (CLI derivation): $(grep OPENCODE_CHANNEL "$REPO/nix/opencode.nix")"
    for ch in "" prod; do
      echo "--- OPENCODE_CHANNEL='${ch}'"
      env ${ch:+OPENCODE_CHANNEL=$ch} bun -e 'const { getConfig } = await import("./electron-builder.config.ts"); const c = getConfig(); console.log(JSON.stringify({ appId: c.appId, publish: c.publish }))'
    done
    echo "--- updater gate:"
    grep -n "const enabled" "$REPO/packages/gui-plugins/src/updater/main.ts" || grep -n UPDATER_ENABLED "$REPO/packages/desktop/src/main/constants.ts"

    Run it: bash nix-channel.sh

  10. opencodejr
    added
    reproduced
    on Oct 28, 2026
  11. carterworks commented on Oct 29, 2026

    @carterworks
    carterworks
    on Oct 29, 2026
    Contributor
    More actions

    Also affects MacOS, such as is done by numtide/llm-agents.nix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @Hona
    Hona

Labels

reproduced

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.