Repository navigation
nix support for desktop and relay - #3734
DanConwayDev wants to merge 7 commits into
Conversation
9e693dc to
bc5d973
Compare
|
FYI: i've packaged buzz with nix (nixosModule is planned) |
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>
Signed-off-by: DanConwayDev <DanConwayDev@protonmail.com>
Signed-off-by: DanConwayDev <DanConwayDev@protonmail.com>
Current main has advanced beyond the original package hashes, sidecar set, relay settings, and desktop version. The old default development shell also inherited the entire desktop closure, making a routine nix develop unexpectedly download roughly a gigabyte of GUI and audio dependencies on a cold Linux store. Refresh the flake inputs and content-addressed Cargo/pnpm dependency hashes against the current 0.5.11 lockfiles. Package the Kubernetes backend sidecar, supply the current desktop build prerequisite and licensing metadata, remove the retired media-read-auth switch, and expose the bounded shutdown drain jitter. Keep the default shell to the pinned toolchain and just, with the full native desktop environment available explicitly as .#desktop. The NixOS module remains object-store agnostic and does not install MinIO; migrating the disabled nixos-fi1 test service to a maintained S3 implementation is deliberately outside this repository change. Full local builds are also excluded because the dry run reported a 1.1 GiB cold desktop closure; hosted CI remains the full-build gate. Validated with Nix formatting, nix flake check --no-build, all-system flake evaluation, package and shell dry runs under max-jobs=1/cores=1, and the root cargo-deny advisory policy. Signed-off-by: DanConwayDev <DanConwayDev@protonmail.com>
bc5d973 to
1801736
Compare
|
That looks good. It may be more mature than my version. I've just bumped mine to 0.5.11. |
|
Upstream still has #2516 open, it may be worth waiting for maintainer direction before settling on approach. Feel free to review or borrow from my packaging code as well, so you can reference or use it if helpful. Also happy to help with contribution work if useful. |
Buzz-hosted repositories require the Buzz CLI for announcements, the NIP-98 credential helper for authentication, and Git itself for transport. Export each client component plus a combined toolset, and put packaged Git on the Linux desktop runtime PATH. The relay pre-receive hook is a Bash script that also invokes coreutils and sed. Add those tools to the NixOS module default service PATH and assert the complete hook runtime in the module check so authenticated pushes reach policy evaluation. Reuse one locked workspace Cargo vendor derivation for the client and desktop sidecars. This assumes the documented Git 2.46-or-newer credential behavior. Deployment and direct nixos-fi1 configuration changes are deliberately excluded. Validated with nix flake check --no-build; builds of buzz-cli, git-credential-nostr, buzz-git-tools, buzz-desktop, and the NixOS module check; wrapper inspection; and a disposable live announcement/authentication test that reproduced the missing-Bash hook failure. Signed-off-by: DanConwayDev <DanConwayDev@protonmail.com>
Make buzz-desktop (source build via cargo-tauri + pnpm) the default desktop package, matching the approach used by other Nix PRs (block#3434, block#3734). Add buzz-desktop-prebuilt as a faster alternative that wraps the official release artifacts. The source build works on all four standard platforms including aarch64-linux (which has no prebuilt binary). It requires sherpa-onnx static libraries, sidecar binaries, and the pnpm frontend build. The prebuilt package remains available for users who want faster installation and are on a platform with a release binary. CI updated to build both variants on Linux and Darwin, with longer timeouts for the source build (90 min vs 10 min for prebuilt). Signed-off-by: levonk <277861+levonk@users.noreply.github.com>
|
Closing this in favour of the community packaging in mulatta/buzz.nix and the Buzz desktop packaging work in nixpkgs. I’ve switched ngit’s Buzz test fixture from my Nix PR branch to a pinned version of mulatta/buzz.nix, so I no longer need to maintain this separate packaging branch. Thanks for the work on making Buzz available through Nix! |
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
buzz-relayandbuzz-adminfrom the root workspace.buzz-relayandbuzz-adminflake apps.Nix store.
controls.
migrations, closed relays, health probes, and metrics.
Flake outputs
packages.<system>.buzz-desktoppackages.<system>.buzz-sidecarspackages.<linux-system>.buzz-relayapps.<linux-system>.buzz-relayapps.<linux-system>.buzz-adminnixosModules.buzz-relaydevShells.<system>.defaultValidation
The branch has been rebased onto current
main, including Buzz Desktopv0.5.2.nix fmt -- --check ...nix flake show --all-systemsnix flake check --print-build-logsbuzz-desktop,buzz-sidecars,buzz-relay, andbuzz-admin0026buzz-adminCLIactionlintThe 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