From 908656e5d42fc66e6619bc14fc38ce34c1bb8255 Mon Sep 17 00:00:00 2001 From: Ryan Yin Date: Sun, 13 Apr 2025 13:32:12 +0800 Subject: [PATCH] feat: add cursor ai editor --- .../gui/hyprland/values/wayland-apps.nix | 51 ++++++++----------- modules/darwin/apps.nix | 1 + 2 files changed, 23 insertions(+), 29 deletions(-) diff --git a/home/linux/gui/hyprland/values/wayland-apps.nix b/home/linux/gui/hyprland/values/wayland-apps.nix index c358c96d..24cd8609 100644 --- a/home/linux/gui/hyprland/values/wayland-apps.nix +++ b/home/linux/gui/hyprland/values/wayland-apps.nix @@ -21,10 +21,11 @@ '' + (builtins.readFile "${nur-ryan4yin.packages.${pkgs.system}.catppuccin-foot}/catppuccin-mocha.conf"); - home.packages = [ - # pkgs.firefox-wayland - pkgs.nixpaks.firefox - pkgs.nixpaks.firefox-desktop-item + home.packages = with pkgs; [ + # firefox-wayland + nixpaks.firefox + nixpaks.firefox-desktop-item + code-cursor # an AI code editor ]; programs = { @@ -65,32 +66,24 @@ # let vscode sync and update its configuration & extensions across devices, using github account. userSettings = {}; package = - (pkgs.vscode.override - { - isInsiders = true; - # https://wiki.archlinux.org/title/Wayland#Electron - commandLineArgs = [ - "--ozone-platform-hint=auto" - "--ozone-platform=wayland" - # make it use GTK_IM_MODULE if it runs with Gtk4, so fcitx5 can work with it. - # (only supported by chromium/chrome at this time, not electron) - "--gtk-version=4" - # make it use text-input-v1, which works for kwin 5.27 and weston - "--enable-wayland-ime" + pkgs.vscode.override + { + isInsiders = false; + # https://wiki.archlinux.org/title/Wayland#Electron + commandLineArgs = [ + "--ozone-platform-hint=auto" + "--ozone-platform=wayland" + # make it use GTK_IM_MODULE if it runs with Gtk4, so fcitx5 can work with it. + # (only supported by chromium/chrome at this time, not electron) + "--gtk-version=4" + # make it use text-input-v1, which works for kwin 5.27 and weston + "--enable-wayland-ime" - # TODO: fix https://github.com/microsoft/vscode/issues/187436 - # still not works... - "--password-store=gnome" # use gnome-keyring as password store - ]; - }) - .overrideAttrs (oldAttrs: rec { - # Use VSCode Insiders to fix crash: https://github.com/NixOS/nixpkgs/issues/246509 - src = builtins.fetchTarball { - url = "https://update.code.visualstudio.com/latest/linux-x64/insider"; - sha256 = "0k2sh7rb6mrx9d6bkk2744ry4g17d13xpnhcisk4akl4x7dn6a83"; - }; - version = "latest"; - }); + # TODO: fix https://github.com/microsoft/vscode/issues/187436 + # still not works... + "--password-store=gnome" # use gnome-keyring as password store + ]; + }; }; }; } diff --git a/modules/darwin/apps.nix b/modules/darwin/apps.nix index 264d42bd..8c8c097c 100644 --- a/modules/darwin/apps.nix +++ b/modules/darwin/apps.nix @@ -158,6 +158,7 @@ in { "google-chrome" "visual-studio-code" "zed" # zed editor + "cursor" # an AI code editor "aerospace" # an i3-like tiling window manager for macOS "ghostty" # terminal emulator