Skip to content

feat(nix): add complete Nix build system with Tauri and OpenGL fixes#82

Open
commandodev wants to merge 1 commit into
winfunc:mainfrom
getmissionctrl:main
Open

feat(nix): add complete Nix build system with Tauri and OpenGL fixes#82
commandodev wants to merge 1 commit into
winfunc:mainfrom
getmissionctrl:main

Conversation

@commandodev
Copy link
Copy Markdown

Add Nix flake with proper Tauri v2 build configuration that resolves both asset embedding and graphics driver issues on NixOS.

Key changes:

  • Add flake.nix with separate frontend and backend builds
  • Use bun2nix for frontend build with proper filtering
  • Use cargo-tauri for Rust build to embed assets correctly
  • Modify tauri.conf.json during build to skip frontend rebuild
  • Add software rendering fallback for OpenGL compatibility
  • Use wrapGAppsHook3 for proper GTK/WebKit integration
  • Add result/ to .gitignore and .envrc for direnv support

The application now builds and runs successfully on NixOS without requiring manual driver configuration or external dependencies.

I've only tested this on wayland/hyprland so far.

Add Nix flake with proper Tauri v2 build configuration that resolves
both asset embedding and graphics driver issues on NixOS.

Key changes:
- Add flake.nix with separate frontend and backend builds
- Use bun2nix for frontend build with proper filtering
- Use cargo-tauri for Rust build to embed assets correctly
- Modify tauri.conf.json during build to skip frontend rebuild
- Add software rendering fallback for OpenGL compatibility
- Use wrapGAppsHook3 for proper GTK/WebKit integration
- Add result/ to .gitignore and .envrc for direnv support

Fixes:
- Resolves "Could not connect to localhost" by properly embedding dist/
- Eliminates OpenGL driver errors with software rendering
- Follows nixpkgs patterns used by other Tauri applications

The application now builds and runs successfully on NixOS without
requiring manual driver configuration or external dependencies.
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