Cursor is now available on nixos

Looks like you’re stuck downloading the specific appimage from cursor.com. It could be your network, it could be that the file is no longer available.

Perhaps you could try https://cache.nixos.org/ as your substituter? There’s a built copy of cursor there.

oh ,i build success ! It just seems to take a bit too long.
But now I’m using the i3wm environment, and I can’t launch Cursor with drun(rofi) , but I can start it via the command line like cursor ■■■_folder. Hmm, do you know what might be the reason?


ifnk in 🌐 ifnk-pc in nixos-config on  master took 20s ❯ sudo nixos-rebuild switch --flake .#ifnk-pc -vv --show-trace --option substituters "https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store"
$ nix --extra-experimental-features nix-command flakes build --out-link /tmp/nixos-rebuild.DMIbtN/nixos-rebuild .#nixosConfigurations."ifnk-pc".config.system.build.nixos-rebuild -vv --show-trace --option substituters https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store
evaluating file '<nix/derivation-internal.nix>'
evaluating derivation 'git+file:///home/ifnk/nixos-config#nixosConfigurations."ifnk-pc".config.system.build.nixos-rebuild'...
evaluating file '/nix/store/ad689rd7j0prpyj483hfhsdmhgsb0bd1-source/flake.nix'
$ exec /nix/store/rdpwz6cq2d2blj3naqgh8pyn9l770zj7-nixos-rebuild/bin/nixos-rebuild switch --flake .#ifnk-pc -vv --show-trace --option substituters https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store
building the system configuration...
Building in flake mode.
$ nix --extra-experimental-features nix-command flakes build .#nixosConfigurations."ifnk-pc".config.system.build.toplevel -vv --show-trace --option substituters https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store --out-link /tmp/nixos-rebuild.m4iary/result
evaluating file '<nix/derivation-internal.nix>'
evaluating derivation 'git+file:///home/ifnk/nixos-config#nixosConfigurations."ifnk-pc".config.system.build.toplevel'...
evaluating file '/nix/store/ad689rd7j0prpyj483hfhsdmhgsb0bd1-source/flake.nix'
these 20 derivations will be built:
  /nix/store/a2xjqwjfmj47366ll884c54786xcjmv6-Cursor-0.47.8-82ef0f61c01d079d1b7e5ab04d88499d5af500e3.deb.glibc2.25-x86_64.AppImage.drv
  /nix/store/q2c370akz10mljiwjrw0riqbmz63cbgv-cursor-0.47.8-extracted.drv
  /nix/store/m9qsrd7rdfkazxb2wki1yprnmvlndp5c-cursor-0.47.8-init.drv
  /nix/store/0b52lhak4v7b4dl0fxrkpzssi2n3g9ws-cursor-0.47.8-bwrap.drv
  /nix/store/qs6dh2gvlj4br4zf5q861q7v8v7jxg0n-cursor-0.47.8.drv
  /nix/store/x72f97i3f8lnlajc3dqlb87dll69z5cf-cursor-0.47.8.drv
  /nix/store/2xwirny80dlli3d7x4hhzl1algi8nn2j-home-manager-path.drv
  /nix/store/mfmswhmy6q5xvnvkmrr9hyjg8rya8afg-user-environment.drv
  /nix/store/qpw8wvq0fgb2xj24b32jk0djkiqh3i9l-hm_fontconfigconf.d10hmfonts.conf.drv
  /nix/store/byxcwlycrhlmpi7dbyslqy5j2pjmijvq-cursor-0.47.8-fish-completions.drv
  /nix/store/whz3589hijgh4kf26xa85nxxvrsciib9-ifnk-fish-completions.drv
  /nix/store/7bldwmsp786yxsc4q850pxb7v5l9g4ln-man-paths.drv
  /nix/store/6lpmhhnv2hl5blfj4mljxbz4650yqw3p-man-cache.drv
  /nix/store/z1p87cx719b9940ik4wki4xzvv57d4k3-hm_.manpath.drv
  /nix/store/akary6bd6b7xb6261v9a2bksc3b5wl5m-home-manager-files.drv
  /nix/store/33g9rlfkd4hvnqlwkh1pvq9bbj9j4ncd-home-manager-generation.drv
  /nix/store/nj98lw9cnww14b75kvwgaalqw1nqmikb-unit-home-manager-ifnk.service.drv
  /nix/store/r7m2sfxw2fp8klskaqi68qavwqrg6x5j-system-units.drv
  /nix/store/b8kg0c0ml4l1ih838q0183wqkv4w7k8x-etc.drv
  /nix/store/2cypa772wgrsqsdm7kkhyapvmccr79dq-nixos-system-ifnk-pc-25.05.20250331.77b584d.drv
building '/nix/store/a2xjqwjfmj47366ll884c54786xcjmv6-Cursor-0.47.8-82ef0f61c01d079d1b7e5ab04d88499d5af500e3.deb.glibc2.25-x86_64.AppImage.drv'...
[1/0/20 built] building Cursor-0.47.8-82ef0f61c01d079d1b7e5ab04d88499d5af500e3.deb.glibc2.25-x86_64.AppImage:                                  Dload  Upload   Total   Spent    Left  Speed
[1/0/20 built] building Cursor-0.47.8-82ef0f61c01d079d1b7e5ab04d88499d5af500e3.deb.glibc2.25-x86_64.AppImage:                                  Dload  Upload   Total   Spent    Left  Speed
building '/nix/store/q2c370akz10mljiwjrw0riqbmz63cbgv-cursor-0.47.8-extracted.drv'...
building '/nix/store/m9qsrd7rdfkazxb2wki1yprnmvlndp5c-cursor-0.47.8-init.drv'...
building '/nix/store/0b52lhak4v7b4dl0fxrkpzssi2n3g9ws-cursor-0.47.8-bwrap.drv'...
building '/nix/store/qs6dh2gvlj4br4zf5q861q7v8v7jxg0n-cursor-0.47.8.drv'...
building '/nix/store/x72f97i3f8lnlajc3dqlb87dll69z5cf-cursor-0.47.8.drv'...
building '/nix/store/byxcwlycrhlmpi7dbyslqy5j2pjmijvq-cursor-0.47.8-fish-completions.drv'...
building '/nix/store/2xwirny80dlli3d7x4hhzl1algi8nn2j-home-manager-path.drv'...
building '/nix/store/7bldwmsp786yxsc4q850pxb7v5l9g4ln-man-paths.drv'...
building '/nix/store/whz3589hijgh4kf26xa85nxxvrsciib9-ifnk-fish-completions.drv'...
building '/nix/store/6lpmhhnv2hl5blfj4mljxbz4650yqw3p-man-cache.drv'...
building '/nix/store/qpw8wvq0fgb2xj24b32jk0djkiqh3i9l-hm_fontconfigconf.d10hmfonts.conf.drv'...
building '/nix/store/mfmswhmy6q5xvnvkmrr9hyjg8rya8afg-user-environment.drv'...
building '/nix/store/z1p87cx719b9940ik4wki4xzvv57d4k3-hm_.manpath.drv'...
building '/nix/store/akary6bd6b7xb6261v9a2bksc3b5wl5m-home-manager-files.drv'...
building '/nix/store/33g9rlfkd4hvnqlwkh1pvq9bbj9j4ncd-home-manager-generation.drv'...
building '/nix/store/nj98lw9cnww14b75kvwgaalqw1nqmikb-unit-home-manager-ifnk.service.drv'...
building '/nix/store/r7m2sfxw2fp8klskaqi68qavwqrg6x5j-system-units.drv'...
building '/nix/store/b8kg0c0ml4l1ih838q0183wqkv4w7k8x-etc.drv'...
building '/nix/store/2cypa772wgrsqsdm7kkhyapvmccr79dq-nixos-system-ifnk-pc-25.05.20250331.77b584d.drv'...
$ nix-env -p /nix/var/nix/profiles/system --set /nix/store/kgkqchi9x55xvygmzghmpd1j8lndsln8-nixos-system-ifnk-pc-25.05.20250331.77b584d
$ systemd-run -E LOCALE_ARCHIVE -E NIXOS_INSTALL_BOOTLOADER= --collect --no-ask-password --pipe --quiet --service-type=exec --unit=nixos-rebuild-switch-to-configuration --wait true
Using systemd-run to switch configuration.
$ systemd-run -E LOCALE_ARCHIVE -E NIXOS_INSTALL_BOOTLOADER= --collect --no-ask-password --pipe --quiet --service-type=exec --unit=nixos-rebuild-switch-to-configuration --wait /nix/store/kgkqchi9x55xvygmzghmpd1j8lndsln8-nixos-system-ifnk-pc-25.05.20250331.77b584d/bin/switch-to-configuration switch
updating systemd-boot from 256.10 to 257.3
Copied "/nix/store/b2cfj7yk3wfg1jdwjzim7306hvsc5gnl-systemd-257.3/lib/systemd/boot/efi/systemd-bootx64.efi" to "/boot/EFI/systemd/systemd-bootx64.efi".
Copied "/nix/store/b2cfj7yk3wfg1jdwjzim7306hvsc5gnl-systemd-257.3/lib/systemd/boot/efi/systemd-bootx64.efi" to "/boot/EFI/BOOT/BOOTX64.EFI".
stopping the following units: accounts-daemon.service, audit.service, kmod-static-nodes.service, logrotate-checkconf.service, mount-pstore.service, network-local-commands.service, network-setup.service, nscd.service, resolvconf.service, systemd-modules-load.service, systemd-oomd.service, systemd-oomd.socket, systemd-sysctl.service, systemd-timesyncd.service, systemd-vconsole-setup.service, vmware.service
NOT restarting the following changed units: display-manager.service, [email protected], systemd-fsck@dev-disk-by\x2duuid-2121\x2d4032.service, systemd-journal-flush.service, systemd-logind.service, systemd-random-seed.service, systemd-remount-fs.service, systemd-update-utmp.service, systemd-user-sessions.service, [email protected], [email protected]
activating the configuration...
setting up /etc...
restarting systemd...
reloading user units for ifnk...
restarting sysinit-reactivation.target
reloading the following units: dbus.service, firewall.service, reload-systemd-vconsole-setup.service
restarting the following units: dhcpcd.service, nix-daemon.service, polkit.service, run-vmblock\x2dfuse.mount, sshd.service, systemd-journald.service, systemd-udevd.service
starting the following units: accounts-daemon.service, audit.service, kmod-static-nodes.service, logrotate-checkconf.service, mount-pstore.service, network-setup.service, nscd.service, resolvconf.service, systemd-modules-load.service, systemd-oomd.socket, systemd-sysctl.service, systemd-timesyncd.service, systemd-vconsole-setup.service, vmware.service
the following new units were started: sys-kernel-tracing.mount, sysinit-reactivation.target, systemd-journald-audit.socket, systemd-tmpfiles-resetup.service
Done. The new configuration is /nix/store/kgkqchi9x55xvygmzghmpd1j8lndsln8-nixos-system-ifnk-pc-25.05.20250331.77b584d

I filed a patch for the launch issue (including rofi, hopefully) yesterday.

Thank you. I can see that the PR has been merged so I just updated my cursor off of the latest unstable and I still have issues with keybindings.

This is what I am getting back in my terminal

$ ELECTRON_OZONE_PLATFORM_HINT=auto cursor
MESA-LOADER: failed to open dri: /run/opengl-driver/lib/gbm/dri_gbm.so: cannot open shared object file: No such file or directory (search paths /run/opengl-driver/lib/gbm, suffix _gbm)
MESA-LOADER: failed to open dri: /run/opengl-driver/lib/gbm/dri_gbm.so: cannot open shared object file: No such file or directory (search paths /run/opengl-driver/lib/gbm, suffix _gbm)
Warning: 'update' is not in the list of known options, but still passed to Electron/Chromium.
[main 2025-04-23T09:43:16.545Z] updateURL https://api2.cursor.sh/updates/api/update/linux-x64/cursor/0.48.8/9e5fff8ca3e1f7e9186f1ef62a4b236593f8427ed4046e25d939142948a5e4a4/stable
[main 2025-04-23T09:43:16.545Z] update#setState idle
Error: Cannot find module './build/Debug/keymapping'
Require stack:
- /nix/store/k3vl8c9j9c4vyd3hp7cnpm7cqaypk03n-cursor-0.48.8-extracted/usr/share/cursor/resources/app/node_modules/native-keymap/index.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1232:15)
    at s._resolveFilename (node:electron/js2c/browser_init:2:124485)
    at Module._load (node:internal/modules/cjs/loader:1058:27)
    at c._load (node:electron/js2c/node_init:2:16955)
    at Module.require (node:internal/modules/cjs/loader:1318:19)
    at require (node:internal/modules/helpers:179:18)
    at NativeBinding._init (/nix/store/k3vl8c9j9c4vyd3hp7cnpm7cqaypk03n-cursor-0.48.8-extracted/usr/share/cursor/resources/app/node_modules/native-keymap/index.js:19:24)
    at NativeBinding.getKeyMap (/nix/store/k3vl8c9j9c4vyd3hp7cnpm7cqaypk03n-cursor-0.48.8-extracted/usr/share/cursor/resources/app/node_modules/native-keymap/index.js:24:10)
    at exports.getKeyMap (/nix/store/k3vl8c9j9c4vyd3hp7cnpm7cqaypk03n-cursor-0.48.8-extracted/usr/share/cursor/resources/app/node_modules/native-keymap/index.js:63:18)
    at _2 (file:///nix/store/k3vl8c9j9c4vyd3hp7cnpm7cqaypk03n-cursor-0.48.8-extracted/usr/share/cursor/resources/app/out/main.js:56:28455)
    at Lh.g (file:///nix/store/k3vl8c9j9c4vyd3hp7cnpm7cqaypk03n-cursor-0.48.8-extracted/usr/share/cursor/resources/app/out/main.js:56:28972) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/nix/store/k3vl8c9j9c4vyd3hp7cnpm7cqaypk03n-cursor-0.48.8-extracted/usr/share/cursor/resources/app/node_modules/native-keymap/index.js'
  ]
}
TypeError: Cannot read properties of null (reading 'getCurrentKeyboardLayout')
    at NativeBinding.getCurrentKeyboardLayout (/nix/store/k3vl8c9j9c4vyd3hp7cnpm7cqaypk03n-cursor-0.48.8-extracted/usr/share/cursor/resources/app/node_modules/native-keymap/index.js:34:29)
    at exports.getCurrentKeyboardLayout (/nix/store/k3vl8c9j9c4vyd3hp7cnpm7cqaypk03n-cursor-0.48.8-extracted/usr/share/cursor/resources/app/node_modules/native-keymap/index.js:60:18)
    at _2 (file:///nix/store/k3vl8c9j9c4vyd3hp7cnpm7cqaypk03n-cursor-0.48.8-extracted/usr/share/cursor/resources/app/out/main.js:56:28471)
    at Lh.g (file:///nix/store/k3vl8c9j9c4vyd3hp7cnpm7cqaypk03n-cursor-0.48.8-extracted/usr/share/cursor/resources/app/out/main.js:56:28972)
TypeError: Cannot read properties of null (reading 'onDidChangeKeyboardLayout')
    at NativeBinding.onDidChangeKeyboardLayout (/nix/store/k3vl8c9j9c4vyd3hp7cnpm7cqaypk03n-cursor-0.48.8-extracted/usr/share/cursor/resources/app/node_modules/native-keymap/index.js:43:22)
    at exports.onDidChangeKeyboardLayout (/nix/store/k3vl8c9j9c4vyd3hp7cnpm7cqaypk03n-cursor-0.48.8-extracted/usr/share/cursor/resources/app/node_modules/native-keymap/index.js:66:18)
    at Lh.g (file:///nix/store/k3vl8c9j9c4vyd3hp7cnpm7cqaypk03n-cursor-0.48.8-extracted/usr/share/cursor/resources/app/out/main.js:56:28984)
[7087:0423/114316.591082:ERROR:command_buffer_proxy_impl.cc(131)] ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer.
[main 2025-04-23T09:43:46.547Z] update#setState checking for updates
[main 2025-04-23T09:43:46.676Z] update#setState available for download
[main 2025-04-23T09:44:07.660Z] Extension host with pid 7197 exited with code: 0, signal: unknown.
[main 2025-04-23T09:44:07.672Z] [UtilityProcess id: 1, type: fileWatcher, pid: 7166]: crashed with code 15 and reason 'killed'
[6998:0423/114407.711119:ERROR:wayland_event_watcher.cc(47)] libwayland: warning: queue 0x49c00e6c600 destroyed while proxies still attached:

[6998:0423/114407.711347:ERROR:wayland_event_watcher.cc(47)] libwayland:   wl_shm_pool#46 still attached

This is the version information from Cursor

Version: 0.48.8
VSCode Version: 1.96.2
Commit: 7801■■■6824585b7f2721900066bc87c4a09b740
Date: 2025-04-07T19:55:57.662Z
Electron: 34.3.4
Chromium: 132.0.6834.210
Node.js: 20.18.3
V8: 13.2.152.41-electron.0
OS: Linux x64 6.14.3

That’s a known issue on Cursor’s end.

Got it. Is there some official report on the matter or thread that I could follow for updates on it?

Has anyone been able to install the cursor/code command in the path? I’m way too used to the development workflow where I use zoxide to cd to some deeply rooted (but organized) directory and running cursor . or code . but the option failed when I first tried it on NixOS and I haven’t been able to get it to show up since then either.

Please file a bug at NixOS/nixpkgs so I can handle it there.

Have an issue? Please read

If you’re having an issue running cursor, please include some basic information:

  1. Which release?
  2. Which platform (Linux or MacOS)
  3. For Linux, which window manager (and whether you’re using X11 or Wayland)

I may ask you to file a bug at NixOS/nixpkgs if we need to have a longer conversation to isolate the issue.

I can reproduce the issue on my machine. Try cursor --ozone-platform=x11 and see if that works.

I’ll fix this in nixpkgs.

cursor --ozone-platform=x11 doesn’t fix it. I’m on wayland. I can file a bug on nixpkgs!

I’m also on Wayland (via KDE). Please try the flag if you haven’t – it’s useful data to know if this works.

I can’t seem to get it to work regardless of if I have the flag or not. I presume it may be due to specifics of how my environment is setup. There’s additional details on the github issue.
we can continue the discussion on the github issue if you’d favour that more: code-cursos: missing entries to install `cursor` and `code` commands on NixOS · Issue #402342 · NixOS/nixpkgs · GitHub

1 Like

I replied in the bug. TL;dr you don’t need to install the cursor command, it’s done automatically as part of the code-cursor install. (I thought you were having a window not opening issue, hence the x11 suggestion).

Following up on @hackr-sh’s feedback:

  1. The concern was that code-cursor doesn’t enable the install cursor to path and install code to path commands on MacOS. These drop a launcher script in /usr/local/bin. That’s not the nix way (it breaks reproducibility).
  2. I looked to see if I could wrap the cursor executable with some of the launcher script features. Nothing else in nixpkgs does this, so I’m not breaking with that (de facto) standard.

TL;dr not in line with how nix works. Sorry :woman_shrugging:

After months’ worth of volunteer time, taking time away from billable hours, I’m no longer maintaining cursor on nixos. Anyone with the skills needed is free to add themselves as a maintainer.