Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
d53a910
Update Cursor to version 2.0.34 with new download URL and SHA256 chec…
ProxayFox Nov 3, 2025
2281c43
Enhance update-cursor.sh with automatic URL finding and dependency ch…
ProxayFox Nov 4, 2025
8975a04
Refactor update-cursor.yml to use nix shell for dependency management
ProxayFox Nov 4, 2025
1d72982
README update
ProxayFox Nov 4, 2025
9619600
Update Cursor to version 2.0.77 with new download URL and SHA256 chec…
ProxayFox Nov 15, 2025
bf3a392
chore: update Cursor to version 2.1.19
github-actions[bot] Nov 22, 2025
7b40a02
chore: update Cursor to version 2.1.24
github-actions[bot] Nov 23, 2025
e7d5bbd
chore: update Cursor to version 2.1.25
github-actions[bot] Nov 24, 2025
91d9418
chore: update Cursor to version 2.1.26
github-actions[bot] Nov 25, 2025
14f95a6
chore: update Cursor to version 2.1.35
github-actions[bot] Nov 26, 2025
9048567
chore: update Cursor to version 2.1.39
github-actions[bot] Nov 27, 2025
c2600c8
chore: update Cursor to version 2.1.42
github-actions[bot] Dec 1, 2025
590c8df
chore: update Cursor to version 2.1.44
github-actions[bot] Dec 2, 2025
4649a49
chore: update Cursor to version 2.1.46
github-actions[bot] Dec 3, 2025
25e55fb
chore: update Cursor to version 2.1.47
github-actions[bot] Dec 4, 2025
f69a86d
chore: update Cursor to version 2.1.48
github-actions[bot] Dec 5, 2025
1435529
chore: setup Dapendabot and update documentation for automated depend…
ProxayFox Dec 6, 2025
1188ac2
chore(deps): update Nix flake inputs
ProxayFox Dec 6, 2025
c7a6b76
Merge pull request #1 from ProxayFox/automated/update-flake-inputs
ProxayFox Dec 6, 2025
d305941
chore(deps): bump the github-actions group with 4 updates
dependabot[bot] Dec 6, 2025
df22f9e
Merge pull request #2 from ProxayFox/dependabot/github_actions/github…
ProxayFox Dec 6, 2025
53f701c
chore: update Cursor to version 2.1.49
github-actions[bot] Dec 6, 2025
1f5d944
chore: update Cursor to version 2.1.50
github-actions[bot] Dec 7, 2025
bf09ed4
chore: update Cursor to version 2.2.14
github-actions[bot] Dec 11, 2025
f89c4d4
chore: update Cursor to version 2.2.17
github-actions[bot] Dec 12, 2025
6810831
chore: update Cursor to version 2.2.20
github-actions[bot] Dec 13, 2025
f5ffc64
chore: update Cursor to version 2.2.23
github-actions[bot] Dec 16, 2025
89c70f4
chore: update Cursor to version 2.2.27
github-actions[bot] Dec 17, 2025
9e84656
chore: update Cursor to version 2.2.20
github-actions[bot] Dec 18, 2025
f4589f3
chore: update Cursor to version 2.2.36
github-actions[bot] Dec 19, 2025
7ba1772
chore: update Cursor to version 2.2.43
github-actions[bot] Dec 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
version: 2
updates:
# Monitor GitHub Actions dependencies
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
time: "02:00"
open-pull-requests-limit: 10
labels:
- "dependencies"
- "github-actions"
commit-message:
prefix: "chore"
include: "scope"
reviewers:
- "proxay"
# Group all GitHub Actions updates into a single PR
groups:
github-actions:
patterns:
- "*"

# Monitor Nix flake inputs
# Note: Dependabot doesn't natively support Nix flakes.
# Nix flake inputs (nixpkgs) are automatically updated via the
# 'update-flake-inputs.yml' workflow which runs weekly and creates PRs.
#
# Cursor version updates are handled by the 'update-cursor.yml' workflow
# which runs daily and automatically commits updates.
#
# Both workflows complement this Dependabot configuration to keep
# all dependencies up to date.

# If you add Docker or other dependencies in the future,
# uncomment and configure as needed:
# - package-ecosystem: "docker"
# directory: "/"
# schedule:
# interval: "weekly"
# open-pull-requests-limit: 5
# labels:
# - "dependencies"
# - "docker"

87 changes: 87 additions & 0 deletions .github/workflows/update-cursor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: Update Cursor

on:
# Run daily at 2 AM UTC
schedule:
- cron: '0 2 * * *'

# Allow manual trigger
workflow_dispatch:

permissions:
contents: write

jobs:
update-cursor:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Install Nix
uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
experimental-features = nix-command flakes

- name: Run update script
id: update
continue-on-error: true
run: |
chmod +x update-cursor.sh
# Run the script in a nix shell with all required dependencies
nix shell nixpkgs#curl nixpkgs#htmlq nixpkgs#ripgrep --command ./update-cursor.sh

- name: Check for changes
id: check_changes
run: |
if git diff --quiet flake.nix; then
echo "changed=false" >> $GITHUB_OUTPUT
echo "No changes detected"
else
echo "changed=true" >> $GITHUB_OUTPUT
echo "Changes detected in flake.nix"
fi

- name: Get new version
id: version
if: steps.check_changes.outputs.changed == 'true'
run: |
VERSION=$(grep -o 'version = "[^"]*"' flake.nix | head -1 | sed 's/version = "//;s/"//')
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "New version: $VERSION"

- name: Commit and push changes
if: steps.check_changes.outputs.changed == 'true'
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
# Only commit flake.nix as Cursor version changes don't affect flake.lock
# flake.lock is managed by the update-flake-inputs.yml workflow
git add flake.nix
git commit -m "chore: update Cursor to version ${{ steps.version.outputs.version }}"
git push

- name: Create Release (optional)
if: steps.check_changes.outputs.changed == 'true'
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ steps.version.outputs.version }}
name: Cursor ${{ steps.version.outputs.version }}
body: |
Automated update to Cursor version ${{ steps.version.outputs.version }}

## Changes
- Updated Cursor AppImage URL
- Updated SHA256 hash

Run `nix flake update` in your NixOS configuration to get the latest version.
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

96 changes: 96 additions & 0 deletions .github/workflows/update-flake-inputs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
name: Update Nix Flake Inputs

on:
# Run weekly on Monday at 3 AM UTC (after the daily Cursor update)
schedule:
- cron: '0 3 * * 1'

# Allow manual trigger
workflow_dispatch:

permissions:
contents: write
pull-requests: write

jobs:
update-flake-inputs:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
# Ensure we have the latest changes (important if cursor was just updated)
ref: main

- name: Install Nix
uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
experimental-features = nix-command flakes

- name: Update flake inputs
id: update
run: |
echo "Updating flake inputs..."
nix flake update

# Check if there are any changes
if git diff --quiet flake.lock; then
echo "changed=false" >> $GITHUB_OUTPUT
echo "No updates available"
else
echo "changed=true" >> $GITHUB_OUTPUT
echo "Updates found in flake.lock"
fi

- name: Test build after update
if: steps.update.outputs.changed == 'true'
run: |
echo "Testing build with updated inputs..."
nix build .#cursor --no-link
echo "Build test successful!"

- name: Get nixpkgs version info
id: version_info
if: steps.update.outputs.changed == 'true'
run: |
# Extract nixpkgs revision from flake.lock
NIXPKGS_REV=$(jq -r '.nodes.nixpkgs.locked.rev' flake.lock | cut -c1-7)
echo "nixpkgs_rev=$NIXPKGS_REV" >> $GITHUB_OUTPUT
echo "New nixpkgs revision: $NIXPKGS_REV"

- name: Create Pull Request
if: steps.update.outputs.changed == 'true'
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "chore(deps): update Nix flake inputs"
title: "chore(deps): Update Nix flake inputs"
body: |
## 🔄 Automated Nix Flake Input Update

This PR updates the Nix flake inputs, primarily nixpkgs.

### Changes
- Updated nixpkgs to revision `${{ steps.version_info.outputs.nixpkgs_rev }}`
- Updated `flake.lock` file

### Testing
- ✅ Build test passed with updated inputs

### Review
Please review the changes in `flake.lock` and ensure the build works as expected.

---
*This PR was automatically created by the Update Flake Inputs workflow.*
branch: automated/update-flake-inputs
delete-branch: true
labels: |
dependencies
nix
automated
draft: false

47 changes: 36 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,27 @@

A clean, simple NixOS flake for packaging the [Cursor](https://cursor.sh/) AI-powered code editor.

## 🔄 Automated Dependency Management

This repository features comprehensive automated dependency management:

- ✅ **Daily Cursor updates** - Automatically checks and updates Cursor versions
- ✅ **Weekly Nix flake updates** - Updates nixpkgs and other inputs via PRs
- ✅ **Weekly GitHub Actions updates** - Dependabot keeps CI/CD dependencies current

See [DEPENDENCY-MANAGEMENT.md](DEPENDENCY-MANAGEMENT.md) for detailed information.

## 📦 What This Flake Provides

This flake packages Cursor as a Nix package that can be easily integrated into any NixOS system or used standalone.

**Packages:**

- `packages.x86_64-linux.cursor` - The Cursor editor with full desktop integration
- `packages.x86_64-linux.default` - Same as cursor (default package)

**Features:**

- ✅ **Complete Desktop Integration** - Includes icon extraction and desktop entry
- ✅ **Icon Support** - Automatically extracts and installs Cursor icon from AppImage
- ✅ **MIME Type Associations** - Supports opening various file types with Cursor
Expand Down Expand Up @@ -81,23 +93,27 @@ nix run .#cursor
When a new version of Cursor is released, use the included update script:

### Method 1: Automatic with URL

```bash
./update-cursor.sh "https://downloads.cursor.com/production/[hash]/linux/x64/Cursor-1.6.0-x86_64.AppImage"
```

### Method 2: Interactive

```bash
./update-cursor.sh
# Follow the prompts to enter version or URL
```

### Method 3: Version number

```bash
./update-cursor.sh "1.6.0"
# Script will prompt for the full download URL
```

The script will automatically:

- ✅ Update the version in `flake.nix`
- ✅ Update the download URL
- ✅ Fetch and update the SHA256 hash
Expand All @@ -107,17 +123,23 @@ The script will automatically:

## 📁 Repository Structure

```
```text
cursor-flake/
├── flake.nix # Main flake configuration (package-only)
├── flake.lock # Flake lock file
├── update-cursor.sh # Update script for new versions
├── README.md # This file
├── LICENSE # MIT License
└── archive-old-system-configs/ # Archived old system configs
├── configuration.nix # (archived - was for full system setup)
├── home.nix # (archived - was for home-manager)
└── ... # (other archived files)
├── flake.nix # Main flake configuration (package-only)
├── flake.lock # Flake lock file
├── update-cursor.sh # Update script for new versions
├── README.md # This file
├── LICENSE # MIT License
├── DEPENDENCY-MANAGEMENT.md # Dependency management documentation
├── .github/
│ ├── dependabot.yml # Dependabot configuration
│ └── workflows/
│ ├── update-cursor.yml # Daily Cursor update workflow
│ └── update-flake-inputs.yml # Weekly flake update workflow
└── archive-old-system-configs/ # Archived old system configs
├── configuration.nix # (archived - was for full system setup)
├── home.nix # (archived - was for home-manager)
└── ... # (other archived files)
```

## 🔧 Development
Expand All @@ -142,9 +164,11 @@ If you prefer to update manually:
1. Get the new AppImage URL from [cursor.sh](https://cursor.sh)
2. Update version and URL in `flake.nix`
3. Get the new hash:

```bash
nix-prefetch-url "https://downloads.cursor.com/production/[hash]/linux/x64/Cursor-X.Y.Z-x86_64.AppImage"
```

4. Update the hash in `flake.nix`
5. Test: `nix build .#cursor`

Expand All @@ -166,6 +190,7 @@ This flake uses `appimageTools.extract` and `appimageTools.wrapType2` to properl
This flake was simplified from a previous version that included full NixOS system configurations. The old structure has been archived in `archive-old-system-configs/` for reference.

**Benefits of the new structure:**

- ✅ **Focused**: Just packages Cursor, nothing else
- ✅ **Reusable**: Easy to integrate into any NixOS system
- ✅ **Maintainable**: No complex system configurations to maintain
Expand All @@ -189,4 +214,4 @@ nix build .#cursor

- [Cursor Official Website](https://cursor.sh/)
- [NixOS Documentation](https://nixos.org/manual/nixos/stable/)
- [Nix Flakes Documentation](https://nixos.wiki/wiki/Flakes)
- [Nix Flakes Documentation](https://nixos.wiki/wiki/Flakes)
9 changes: 7 additions & 2 deletions cursor-fix-solution.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

The issue with Cursor when using the custom developed flake is related to native modules not being found when the AppImage runs. The error shows:

```
```text
Error: Cannot find module './build/Debug/keymapping'
Require stack:
- /home/user/.cache/appimage-run/d249132fa6429cbc46050495a19ed410e04db53655428955024ff631c095d11c/usr/share/cursor/resources/app/node_modules/native-keymap/index.js
Expand Down Expand Up @@ -240,10 +240,13 @@ in
1. Open your `home.nix` file
2. Replace the existing `cursorAppImage` section with the updated version above
3. Rebuild your system with:

```bash
sudo nixos-rebuild switch --flake .#cursor-system
```

4. Test Cursor:

```bash
cursor --version
```
Expand All @@ -253,15 +256,17 @@ in
If you still encounter issues:

1. Clear the AppImage cache:

```bash
rm -rf ~/.cache/appimage-run/*
```

2. Try running Cursor with additional debugging:

```bash
cursor --enable-logging --v=1
```

3. Check if the issue persists in a fresh terminal session

These changes should resolve the native module loading issues you're experiencing with Cursor in your NixOS flake.
These changes should resolve the native module loading issues you're experiencing with Cursor in your NixOS flake.
Loading