Nix Package: Auto-updating Nix flake for Cursor AI Code Editor
This flake provides a Nix package for Cursor, the AI-powered code editor, enabling reproducible installation on NixOS and other Nix-enabled systems.
# Try without installing
nix run github:jacopone/code-cursor-nix
# Install in profile
nix profile install github:jacopone/code-cursor-nix
# Use in flake
{
inputs.code-cursor-nix.url = "github:jacopone/code-cursor-nix";
inputs.code-cursor-nix.inputs.nixpkgs.follows = "nixpkgs";
}| Output | Description |
|---|---|
packages.x86_64-linux.default |
Main Cursor package |
packages.x86_64-linux.cursor |
Explicit cursor package |
apps.default |
Run cursor directly |
overlays.default |
For NixOS integration |
# Check upstream Cursor release
# https://www.cursor.com/ or AppImage releases
# Update version in package.nix, then:
nix build
# Copy new hash from error message if hash mismatch
# Test
nix run . -- --version| File | Purpose |
|---|---|
flake.nix |
Flake definition with overlay |
package.nix |
Package derivation (version, src, hash) |
scripts/ |
Update automation scripts |
RELEASING.md |
Release process documentation |
# In your flake.nix
{
inputs.code-cursor-nix.url = "github:jacopone/code-cursor-nix";
}
# In your configuration
{ inputs, ... }:
{
nixpkgs.overlays = [ inputs.code-cursor-nix.overlays.default ];
environment.systemPackages = [ pkgs.cursor ];
}# Build package
nix build
# Run flake checks
nix flake check
# Test in shell
nix shell . -c cursor --version- Uses
inputs.nixpkgs.followsfor consistency with consumer's nixpkgs - Cursor is unfree:
config.allowUnfree = truerequired - Browser automation support included (Chrome/Chromium)