Skip to content

fix(nix): include web dashboard dependencies and frontend in Nix build#9502

Closed
chiyema wants to merge 1 commit into
NousResearch:mainfrom
chiyema:fix/nix-web-dashboard
Closed

fix(nix): include web dashboard dependencies and frontend in Nix build#9502
chiyema wants to merge 1 commit into
NousResearch:mainfrom
chiyema:fix/nix-web-dashboard

Conversation

@chiyema

@chiyema chiyema commented Apr 14, 2026

Copy link
Copy Markdown

Summary

hermes dashboard doesn't work when installed via the Nix flake. Two issues:

  1. uv.lock missing [web] extrafastapi and uvicorn were only resolved under the [rl] marker, so the [all] extra didn't include them. The web optional-dependency group was entirely absent from the lockfile. Fixed by regenerating with uv lock.

  2. Frontend not bundlednix/packages.nix didn't build or include the Vite/React frontend. Fixed by adding a buildNpmPackage derivation and a site-packages overlay with web_dist symlinked into hermes_cli, prepended via PYTHONPATH in the wrapper scripts. No application code changes needed.

Changes

  • uv.lock: Regenerated to properly resolve [web] extra (fastapi, uvicorn) into the [all] group — fixes the root cause rather than working around it
  • nix/packages.nix: Added hermesWeb (buildNpmPackage for the Vite frontend) and hermesSiteOverlay (thin overlay that shadows hermes_cli with web_dist present), passed via PYTHONPATH in makeWrapper

Testing

Tested on x86_64-linux (NixOS Proxmox LXC):

  • nix build succeeds with fastapi 0.133.1 and uvicorn 0.41.0 in the venv
  • web_dist is built and symlinked into the hermes_cli overlay
  • hermes dashboard --host 0.0.0.0 --port 9119 --no-open starts successfully as a systemd service, returns HTTP 200, and serves the React frontend on LAN
  • hermes dashboard --help runs without "Web UI dependencies not installed" error

See also #9307 for an alternative approach — this PR fixes the uv.lock root cause (vs the python.nix workaround in #9307) and adopts the same PYTHONPATH overlay technique for web_dist.

@chiyema chiyema force-pushed the fix/nix-web-dashboard branch 2 times, most recently from 08b8ca7 to 786ef17 Compare April 14, 2026 07:47
Two issues prevented 'hermes dashboard' from working in the Nix package:

1. uv.lock was missing the [web] extra — fastapi and uvicorn were only
   resolved under the [rl] marker, so the [all] extra didn't include them.
   Regenerated with 'uv lock' to fix the root cause.

2. nix/packages.nix didn't build or bundle the Vite/React frontend.
   Added buildNpmPackage derivation for the frontend and a site-packages
   overlay with web_dist symlinked into hermes_cli, prepended via
   PYTHONPATH in the wrapper scripts. No application code changes needed.

Tested on x86_64-linux (NixOS Proxmox LXC):
- nix build succeeds with fastapi 0.133.1 and uvicorn 0.41.0 in the venv
- web_dist is built and symlinked into the hermes_cli overlay
- 'hermes dashboard --host 0.0.0.0 --port 9119 --no-open' starts
  successfully as a systemd service, returns HTTP 200, and serves the
  React frontend on LAN

See also NousResearch#9307 for an alternative approach.
@alt-glitch

Copy link
Copy Markdown
Collaborator

Superseded by #12194 (merged) which builds the web dashboard frontend in the Nix package and touches the same nix/packages.nix.

@alt-glitch alt-glitch closed this Apr 23, 2026
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.

2 participants