Skip to content

Add a flake.nix for NixOS Flake users#2734

Open
Khitboksy wants to merge 13 commits into
pingdotgg:mainfrom
Khitboksy:main
Open

Add a flake.nix for NixOS Flake users#2734
Khitboksy wants to merge 13 commits into
pingdotgg:mainfrom
Khitboksy:main

Conversation

@Khitboksy
Copy link
Copy Markdown

@Khitboksy Khitboksy commented May 16, 2026

What Changed

A - flake.nix
A - flake.lock
M - README.md

flake.nix looks at the parent repo (pingdotgg/t3code), pulls it, builds it from source, and caches the build in a nix/store directory on first build. unless the user runs 'nix flake update', manually updating their flake inputs, t3code on the user machine will not receive codebase changes from the repository. It also will not rebuild the application unless the nix/store hash, and updated repo hash are different.

README.md now includes how to install this application on nixos flake enabled machines.

Why

Currently using t3code on nixos requires using appimages, and other "not-very-nix" ways of installing applications depending on your mode of attack. Ive spent the past few hours creating a flake.nix that reads the repo, builds it from source, and only rebuilds the app if the repo updates. this enables a simple and easy oneliner installation of t3code on nixos machines.

there is very little maintenance on your behalf, only ever needing to update flake.nix:6:nixpkgs.url= to be the latest nixpkgs stable release, OR for a set-and-forget you can set it to nixos-unstable, and change the readme accordingly. the flake handles the nixos specific runtime shenanigans, your source code just tells it what to build

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • [N/A] I included before/after screenshots for any UI changes
  • [N/A] I included a video for animation/interaction changes

Note

Low Risk
Low risk: adds Nix packaging/docs only and does not change application runtime code paths, but installs are now pinned to a specific AppImage release/hash for NixOS users.

Overview
Adds first-class NixOS Flake support by introducing flake.nix/flake.lock that package t3code (x86_64-linux) by fetching a pinned GitHub Releases AppImage and exposing a t3code launcher that runs it via appimage-run.

Updates README.md with NixOS (Flakes) installation instructions showing how to add the flake input and install the package via environment.systemPackages.

Reviewed by Cursor Bugbot for commit 1bed46e. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Add Nix flake for installing t3code on NixOS

  • Adds flake.nix that fetches the t3code AppImage from GitHub releases (pinned to v0.0.24) and wraps it in an appimage-run launcher script, exposing it as packages.x86_64-linux and defaultPackage.
  • Updates README.md with a new 'NixOS (Flakes)' section showing how to add the flake as an input and install the package via systemPackages.
  • Support is limited to x86_64-linux only.

Macroscope summarized 1bed46e.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 16, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 42b599c6-88c6-4d1e-8abc-b09fd39c63f3

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels May 16, 2026
Comment thread flake.nix Outdated
Comment thread flake.nix Outdated
Comment thread flake.nix
Comment thread flake.nix Outdated
Comment thread flake.nix Outdated
Comment thread flake.nix Outdated
Comment thread flake.nix Outdated
@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp Bot commented May 16, 2026

Approvability

Verdict: Approved

This PR adds NixOS Flake packaging support - purely additive distribution configuration that downloads the existing AppImage release and wraps it for NixOS users. No application code or runtime behavior is changed.

You can customize Macroscope's approvability policy. Learn more.

Comment thread flake.nix Outdated
Comment thread flake.nix Outdated
Comment thread flake.nix Outdated
Comment thread flake.nix Outdated
Comment thread flake.nix
Comment thread flake.nix Outdated
Comment thread flake.nix Outdated
Comment thread flake.nix Outdated
Comment thread flake.nix Outdated
@Khitboksy
Copy link
Copy Markdown
Author

minor update: im switching to using the provided appimages instead of building from source

Khitboksy added 2 commits May 16, 2026 14:27
- Add clear sections for releases, download hash, and platforms
- Update hash by running: nix hash url <download-url>
- Only support x86_64-linux (no ARM AppImage available)
- Simplify code for easier maintenance
Comment thread flake.nix
Comment thread flake.nix Outdated
@Khitboksy
Copy link
Copy Markdown
Author

Khitboksy commented May 16, 2026

Updates

M - flake.nix

this started out building from source but ive pivoted due to sandboxing issues, instead deciding to wrap the pre-build appimage with appimage-run. this flake currently only supports the linux appimage.

Maintenance

releaseTag = "v0.0.23";                // version
appimageHash = "sha256-...";           // update with `nix hash url <appimage-url>
supportedSystems = [ "x86_64-linux" ];

i have tested this build on my local flake, AND my fork with the changes. the app built, and opened through my launcher just fine.

README.md updates that for some reason arent appearing on my end.

NixOS (Flakes)

# /path/to/your/flake.nix
{
  inputs = {
    # This flake is pinned to nixpkgs stable
    nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";

    t3code-flake.url = "github:pingdotgg/t3code";
    t3code-flake.inputs.nixpkgs.follows = "nixpkgs";
  };
}
# /path/to/your/configuration.nix
{
  nix.settings.experimental-features = [ "nix-command" "flakes" ];
  environment.systemPackages = [
    pkgs.appimage-run
    inputs.t3code-flake.packages.${system}
  ];
}

this addresses the appimage issue.

Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 01f0ee6. Configure here.

Comment thread flake.nix Outdated
Comment thread flake.nix Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant