Skip to content

nix support for desktop and relay - #3734

Draft
DanConwayDev wants to merge 5 commits into
block:mainfrom
DanConwayDev:feat/nix-desktop-relay-support
Draft

nix support for desktop and relay#3734
DanConwayDev wants to merge 5 commits into
block:mainfrom
DanConwayDev:feat/nix-desktop-relay-support

Conversation

@DanConwayDev

Copy link
Copy Markdown

This was largely one-shotted from #3434, which required a few fixes, together with an updated adaptation of #2307. I’m posting it as a draft for anyone who might be interested.

I have used it to deploy Buzz to a NixOS server and run buzz-desktop locally against that relay, including running Codex through codex-acp. This provides some basic x86_64 Linux coverage, but it has not been robustly tested; other platforms and some desktop integrations remain untested.

Summary

Provide unified Nix support for the Buzz desktop app, relay server,
administration CLI, agent sidecars, development shell, and NixOS deployments.

This combines Daniel Toubul’s desktop work in #3434 with an updated adaptation
of thesimplekid’s relay module from #2307.

Problems addressed

  • Build the current checkout using the repository-pinned Rust toolchain.
  • Replace stale and placeholder dependency hashes with verified inputs.
  • Align pnpm fetching with the desktop workspace’s offline build.
  • Include the native Sherpa, GTK, WebKit, audio, OpenSSL, and C++ dependencies.
  • Repair Tauri binary RPATHs so the packaged desktop app starts on NixOS.
  • Package buzz-relay and buzz-admin from the root workspace.
  • Add runnable buzz-relay and buzz-admin flake apps.
  • Provide a hardened NixOS systemd module using the relay’s current settings.
  • Support environment files for credentials without copying secrets into the
    Nix store.
  • Model current S3 addressing, read-replica pool, and bounded-staleness routing
    controls.
  • Add deployment documentation covering PostgreSQL, Redis, S3, TLS,
    migrations, closed relays, health probes, and metrics.
  • Add path-scoped CI covering formatting, evaluation, module checks, and builds.

Flake outputs

  • packages.<system>.buzz-desktop
  • packages.<system>.buzz-sidecars
  • packages.<linux-system>.buzz-relay
  • apps.<linux-system>.buzz-relay
  • apps.<linux-system>.buzz-admin
  • nixosModules.buzz-relay
  • devShells.<system>.default

Validation

The branch has been rebased onto current main, including Buzz Desktop
v0.5.2.

  • nix fmt -- --check ...
  • nix flake show --all-systems
  • nix flake check --print-build-logs
  • Built buzz-desktop, buzz-sidecars, buzz-relay, and buzz-admin
  • Verified the packaged ELF binaries have complete runtime library closures
  • Launched the desktop package under an isolated Xvfb/D-Bus session
  • Started the packaged relay against disposable PostgreSQL, Redis, and MinIO
  • Verified migration 0026
  • Verified path-style S3 git-object conformance
  • Verified readiness, liveness, application health, and Prometheus metrics
  • Verified the packaged buzz-admin CLI
  • Validated the GitHub Actions workflow with actionlint

The full build and runtime tests were performed on x86_64 Linux. ARM64 Linux
and Apple Silicon macOS outputs were evaluated successfully but were not
physically built on this host.

Draft status

This is being opened as a draft to collect feedback from people interested in
using or maintaining Nix support.

In particular, physical build and runtime testing on ARM64 Linux and Apple
Silicon macOS would be useful before marking it ready for review.

Credits

realitymolder and others added 3 commits July 30, 2026 08:50
Signed-off-by: Daniel Toubul <daniel@toubul.eu>
Complete the initial Nix scaffold by addressing the failures found during end-to-end desktop packaging:

- build the current checkout with the repository's pinned Rust toolchain
- replace stale and placeholder hashes with verified platform inputs
- align pnpm fetch and offline install scopes for the desktop workspace
- package Sherpa and sidecars with the required Linux native libraries
- repair Tauri bundle RPATHs so GTK, WebKit, audio, and C++ libraries resolve
- expose explicit desktop, sidecar, and development-shell outputs
- derive the release version from Cargo metadata instead of a tag-time bot

Signed-off-by: DanConwayDev <DanConwayDev@protonmail.com>
- build buzz-relay and buzz-admin from the pinned workspace toolchain
- expose runnable relay/admin apps alongside the desktop and sidecars
- provide a hardened, configurable NixOS systemd module
- track current S3 addressing, read-pool, and replica-routing controls
- check module environment coercion, IPv6 binding, secrets, and firewall wiring
- document NixOS deployment, migrations, storage, TLS, and closed relays
- add path-scoped CI for formatting, evaluation, checks, and package builds

Adapted from the relay module proposed in block#2307.

Co-authored-by: thesimplekid <tsk@thesimplekid.com>

Signed-off-by: DanConwayDev <DanConwayDev@protonmail.com>
Comment thread .github/workflows/nix.yml Fixed
Signed-off-by: DanConwayDev <DanConwayDev@protonmail.com>
Signed-off-by: DanConwayDev <DanConwayDev@protonmail.com>
@DanConwayDev
DanConwayDev force-pushed the feat/nix-desktop-relay-support branch from 9e693dc to bc5d973 Compare July 30, 2026 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants