Skip to content

feat: Add Nix flake for development environment#100

Merged
dakl merged 3 commits intodakl:mainfrom
mmxgn:add-nix-flake
Feb 26, 2026
Merged

feat: Add Nix flake for development environment#100
dakl merged 3 commits intodakl:mainfrom
mmxgn:add-nix-flake

Conversation

@mmxgn
Copy link

@mmxgn mmxgn commented Feb 26, 2026

Adds a Nix flake that provides:

  • Development shell with Node.js 22, build tools, and Electron dependencies
  • nix run to start the app in dev mode (auto-installs deps)
  • nix run .#build to build the application

The flake handles all Linux-specific Electron dependencies (GTK, X11, Mesa, etc.) and sets up the environment for better-sqlite3 native module compilation.

Adds a Nix flake that provides:
- Development shell with Node.js 22, build tools, and Electron dependencies
- `nix run` to start the app in dev mode (auto-installs deps)
- `nix run .#build` to build the application

Supports both Linux and macOS (Darwin):
- Linux: includes GTK, X11, Mesa, and other Electron runtime dependencies
- macOS: minimal dependencies, uses native frameworks

The flake handles all platform-specific Electron dependencies and sets up
the environment for better-sqlite3 native module compilation.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@mmxgn
Copy link
Author

mmxgn commented Feb 26, 2026

Note, this is not tested on Nix+OSX since I don't have one

@greptile-apps
Copy link

greptile-apps bot commented Feb 26, 2026

Greptile Summary

Adds Nix flake to provide reproducible development environment with Node.js 20, proper Electron dependencies for Linux, and convenient nix run/nix develop commands.

  • Shell scripts handle environment setup, dependency installation, and native module compilation for better-sqlite3
  • Comprehensive Linux runtime libraries (GTK, X11, Mesa) for Electron
  • Platform-aware configuration for both Linux and macOS (Darwin)
  • Clear documentation in README with usage examples
  • Node.js version correctly aligned with CI workflows (20)

Confidence Score: 5/5

  • Safe to merge - adds optional development tooling with no impact on production code or existing workflows
  • Config-only change that adds Nix flake for reproducible development environment. Well-structured with proper error handling, comprehensive dependencies, and accurate documentation. Node.js version correctly matches CI workflows.
  • No files require special attention

Important Files Changed

Filename Overview
flake.nix Adds Nix flake with Node.js 20, proper Electron dependencies, and shell scripts for dev/build - well-structured and platform-aware
flake.lock Standard Nix lockfile with pinned versions of nixpkgs (nixos-unstable) and flake-utils
README.md Adds clear documentation for Nix flake usage with examples for running and developing the app

Last reviewed commit: df80ece

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

flake.nix Outdated

# Common dependencies for both platforms
commonDeps = with pkgs; [
nodejs_22
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uses Node.js 22 while CI workflows (.github/workflows/ci.yml, .github/workflows/release.yml) use Node.js 20. Consider aligning versions for consistency.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mmxgn mmxgn closed this Feb 26, 2026
@mmxgn mmxgn reopened this Feb 26, 2026
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Owner

@dakl dakl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, let's gooooooo!!!

@dakl dakl merged commit b84da05 into dakl:main Feb 26, 2026
4 checks passed
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