add cursor to thinkpad

This commit is contained in:
Yan Lin 2025-12-02 23:55:12 +01:00
parent bd513a60c5
commit b5e8bfcf83
3 changed files with 20 additions and 0 deletions

View file

@ -1,6 +1,10 @@
{ config, pkgs, lib, ... }:
with lib;
let
cfg = config.programs.cursor;
configDir = if pkgs.stdenv.isDarwin
then "Library/Application Support/Cursor/User"
else ".config/Cursor/User";
@ -48,7 +52,18 @@ let
in
{
options.programs.cursor = {
package = mkOption {
type = types.nullOr types.package;
default = null;
example = "pkgs.code-cursor";
description = "Cursor package to use. Set to null on Darwin to use Homebrew-installed Cursor, or pkgs.code-cursor on NixOS.";
};
};
config = {
home.packages = mkIf (cfg.package != null) [ cfg.package ];
home.file."${configDir}/settings.json" = {
text = builtins.toJSON ideSettings;
};

View file

@ -52,6 +52,7 @@ in
favorite-apps = [
"thunar.desktop"
"com.mitchellh.ghostty.desktop"
"cursor.desktop"
"firefox.desktop"
"obsidian.desktop"
"org.keepassxc.KeePassXC.desktop"