Repository navigation
Add a self-contained Nix flake - #4699
colonelpanic8 wants to merge 4 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ 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 |
ApprovabilityVerdict: Needs human review This PR introduces substantial new Nix-based build and packaging infrastructure (838 lines across 5 new files). While it doesn't modify existing application code, the scope and complexity of the new build system, combined with the author being new to this codebase, warrants human review to ensure alignment with project standards. You can customize Macroscope's approvability policy. Learn more. |
93e883a to
1c43295
Compare
1c43295 to
2623d84
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 690c0a6. Configure here.
362fa78 to
a72f355
Compare
Dismissing prior approval to re-evaluate a72f355
|
Note 🤖 GPT-5.6 Sol responding on behalf of Theo Closing this PR after an automated pass over open pull requests. Adds a new unsupported distribution or deployment system that increases ongoing maintenance. |

Summary
Why
This makes checkout builds reproducible without importing or overriding the
t3codepackage from nixpkgs. Nixpkgs supplies standard tools and build dependencies, while this repository owns its workspace selection, build phases, install layout, wrappers, and desktop integration.Validation
nix fmt -- --check flake.nix nix/android.nix nix/package.nix nix/home-manager/t3code-server.nixnix flake check --no-build --all-systemsnix build .#packages.x86_64-linux.unwrapped.pnpmDeps --no-linknix build .#unwrapped --no-linknix build .#checks.x86_64-linux.smoke --no-linkgit diff --check origin/main...HEADNote
Low Risk
New packaging and ops tooling only; no application runtime logic changes, though the Home Manager module can expose Tailscale Serve when enabled.
Overview
Introduces a Nix flake so T3 Code can be built and run from this checkout without relying on nixpkgs’ upstream
t3codepackage.Packages and overlays:
nix/package.nixdrives a pnpm-based derivation (webvp build, server CLI build, desktopvp pack) and installst3/t3code-desktopwith desktop entries and optional macOS.app. Default and optional client-only overlays appear whenDesktopBackendMode.tsexists in the tree.Developer and CI surfaces: Default
nix developshell pins Node 24, pnpm 11, and nixpkgs Electron; Linux adds an Android SDK/NDK shell andnix run .#build-android(script copies the flake source, then prebuilds and Gradle-assembles a release APK). Linuxnix flake checkincludes a headless Electron smoke test under Xvfb that fails on early exit or rendererReferenceError-style boot failures.Deployment: A Home Manager module (
services.t3code) runs a persistent headlesst3 servevia user systemd (Linux) or launchd (macOS), with optional Tailscale Serve and a broad defaultPATHfor agent tooling.Reviewed by Cursor Bugbot for commit a72f355. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add a self-contained Nix flake for building, developing, and deploying T3 Code
nix build .#t3codeproducest3(server CLI) andt3code-desktop(Electron app), with a macOS.appbundle and aclientvariant that forces client-only backend mode.nix developprovides a dev shell with Node 24, pnpm 11, and Electron 41 pre-configured viaELECTRON_OVERRIDE_DIST_PATH.nix run .#build-androidapp and Android dev shell with a full SDK/NDK/JDK toolchain; nix/scripts/build-android-apk.sh handles the full APK build and export.services.t3code) that runs a persistent headless server as a systemd user service (Linux) or LaunchAgent (macOS), with optional Tailscale Serve integration.nix flake checkon Linux runs a headless Xvfb smoke test that fails on early process exit or rendererReferenceErrors.Macroscope summarized a72f355.