feat: add Nix flake dev environment#29
Conversation
Add Nix flake with NixOS-patched Electron binary and direnv integration for reproducible development setup. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughAdds Nix flake support for NixOS users. A new ChangesNix Flake Development Environment
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@README.md`:
- Around line 11-30: The README.md documentation at line 29 references an
incorrect environment variable name `ELECTRON_OVERRIDE_DIST_PATH`, but the
actual flake.nix implementation sets `ELECTRON_EXEC_PATH`. Update the README.md
to replace the environment variable reference from `ELECTRON_OVERRIDE_DIST_PATH`
to `ELECTRON_EXEC_PATH` to match the actual implementation and keep the
documentation accurate with how electron-vite reads this variable.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 90127b66-ddde-4cd9-8d01-98380da145e4
⛔ Files ignored due to path filters (1)
flake.lockis excluded by!**/*.lock
📒 Files selected for processing (4)
.envrc.gitignoreREADME.mdflake.nix
ELECTRON_OVERRIDE_DIST_PATH → ELECTRON_EXEC_PATH to match flake.nix. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
Adds a Nix flake for a reproducible development environment, mainly aimed at NixOS users who can't run the npm-bundled Electron binary out of the box (missing dynamic libraries, no hardcoded RPATHs).
What it does
The flake provides a dev shell with Node.js and a NixOS-patched Electron binary. It sets
ELECTRON_EXEC_PATHso electron-vite picks up the system Electron instead of the one fromnode_modules— noLD_LIBRARY_PATHhacks needed.Includes a
.envrcfor direnv users: rundirenv allowonce and the environment loads automatically every time youcdinto the project.For non-NixOS users
This changes nothing. The flake and
.envrcare inert unless you have Nix installed. The regularnpm install && npm run devworkflow is unchanged.🤖 Generated with Claude Code
Summary by CodeRabbit
nix developalternative.