Skip to content

fix(nix): build web dashboard frontend in Nix package#12194

Merged
alt-glitch merged 1 commit into
mainfrom
sid/nix-dashboard-fix
Apr 18, 2026
Merged

fix(nix): build web dashboard frontend in Nix package#12194
alt-glitch merged 1 commit into
mainfrom
sid/nix-dashboard-fix

Conversation

@alt-glitch

@alt-glitch alt-glitch commented Apr 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

The Nix package (nix/packages.nix) doesn't build the Vite/React web frontend, so hermes dashboard returns {"error":"Frontend not built"} from a Nix install.

  • Add nix/web.nix — builds the web dashboard frontend via buildNpmPackage (mirrors the tui.nix pattern with fetchNpmDeps + update_web_lockfile helper)
  • Wire pre-built assets into the Nix wrapper via HERMES_WEB_DIST env var
  • Skip runtime npm run build in cmd_dashboard when HERMES_WEB_DIST is set
  • Expose .#web as a standalone Nix package

Note: The original issue also reported fastapi being silently dropped from the uv2nix venv. This appears to be resolved on current main — uv.lock correctly includes fastapi in the all extra and hermes dashboard starts without import errors.

Acknowledgements

Thanks to @lvnilesh for the detailed bug report and workarounds in #9305, and to @boozedog for the HERMES_WEB_DIST env var approach in #11621 which this PR adopts.

Fixes #9305
Closes #9307
Closes #11621

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)

Changes Made

  • nix/web.nix — new derivation for web frontend build (mirrors tui.nix pattern)
  • nix/packages.nix — wire hermesWeb into the package, set HERMES_WEB_DIST env var, expose .#web
  • hermes_cli/web_server.py — read HERMES_WEB_DIST env var for pre-built asset path
  • hermes_cli/main.py — skip runtime build when HERMES_WEB_DIST is set

How to Test

  1. nix build .#web — produces the built SPA (index.html, assets/, fonts/)
  2. nix build — full package succeeds
  3. hermes dashboard --host 0.0.0.0 — serves the React UI from a Nix install

Checklist

Code

  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)

The web dashboard (Vite/React frontend) is now built as a separate Nix
derivation and baked into the Hermes package. The build output is
installed to a standard location and exposed via the `HERMES_WEB_DIST`
environment variable, allowing the dashboard command to use pre-built
assets when available (e.g., in packaged releases) instead of rebuilding
on every invocation.
@alt-glitch alt-glitch changed the title Add web dashboard build to Nix flake fix(nix): build web dashboard frontend in Nix package Apr 18, 2026
@alt-glitch alt-glitch marked this pull request as ready for review April 18, 2026 15:25
@alt-glitch alt-glitch merged commit 8a0c774 into main Apr 18, 2026
6 of 7 checks passed
@alt-glitch alt-glitch deleted the sid/nix-dashboard-fix branch April 18, 2026 15:25
Blazenetic added a commit to Blazenetic/hermes-agent that referenced this pull request Apr 19, 2026
- Add repeat count field to cron job creation
- Add skills field with multi-select capability
- Add model override dropdown
- Add toolset toggle endpoint
- Add skill detail inspection modal
- Fix pre-existing bug: @api.post > @app.post for cron jobs
- Add toggle switches to toolset cards in SkillsPage
- Add skill inspection modal with description, tags, path, linked files

Closes NousResearch#12180, NousResearch#12194

Includes comprehensive documentation and testing setup
ulasbilgen pushed a commit to ulasbilgen/hermes-adhd-agent that referenced this pull request May 1, 2026
The web dashboard (Vite/React frontend) is now built as a separate Nix
derivation and baked into the Hermes package. The build output is
installed to a standard location and exposed via the `HERMES_WEB_DIST`
environment variable, allowing the dashboard command to use pre-built
assets when available (e.g., in packaged releases) instead of rebuilding
on every invocation.
aj-nt pushed a commit to aj-nt/hermes-agent that referenced this pull request May 1, 2026
The web dashboard (Vite/React frontend) is now built as a separate Nix
derivation and baked into the Hermes package. The build output is
installed to a standard location and exposed via the `HERMES_WEB_DIST`
environment variable, allowing the dashboard command to use pre-built
assets when available (e.g., in packaged releases) instead of rebuilding
on every invocation.
02356abc pushed a commit to 02356abc/hermes-agent that referenced this pull request May 14, 2026
The web dashboard (Vite/React frontend) is now built as a separate Nix
derivation and baked into the Hermes package. The build output is
installed to a standard location and exposed via the `HERMES_WEB_DIST`
environment variable, allowing the dashboard command to use pre-built
assets when available (e.g., in packaged releases) instead of rebuilding
on every invocation.
gweeteve pushed a commit to gweeteve/hermes-agent that referenced this pull request Jun 2, 2026
The web dashboard (Vite/React frontend) is now built as a separate Nix
derivation and baked into the Hermes package. The build output is
installed to a standard location and exposed via the `HERMES_WEB_DIST`
environment variable, allowing the dashboard command to use pre-built
assets when available (e.g., in packaged releases) instead of rebuilding
on every invocation.
Egavasyug pushed a commit to Egavasyug/hermes-agent that referenced this pull request Jun 10, 2026
The web dashboard (Vite/React frontend) is now built as a separate Nix
derivation and baked into the Hermes package. The build output is
installed to a standard location and exposed via the `HERMES_WEB_DIST`
environment variable, allowing the dashboard command to use pre-built
assets when available (e.g., in packaged releases) instead of rebuilding
on every invocation.
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.

Nix package: missing fastapi + web dashboard frontend not built

1 participant