From 85b644c51237dac94678d1b4a3b1f66c42a002ac Mon Sep 17 00:00:00 2001 From: js0ny Date: Sat, 22 Nov 2025 20:38:22 +0000 Subject: [PATCH] rebuild on darwin --- nixcfgs/hosts/zen/brew.nix | 7 +- nixcfgs/modules/home/darwin.nix | 9 +- nixcfgs/users/js0ny/packages/catppuccin.nix | 6 +- nixcfgs/users/js0ny/packages/cli.nix | 117 ++++++++++---------- nixcfgs/users/js0ny/programs/discord.nix | 4 +- nixcfgs/users/js0ny/programs/duti.nix | 31 ++++++ nixcfgs/users/js0ny/programs/ghostty.nix | 4 - nixcfgs/users/js0ny/programs/rime.nix | 49 ++++++++ nixcfgs/users/js0ny/zen.nix | 5 + nixcfgs/users/js0ny/zephyrus.nix | 2 - 10 files changed, 156 insertions(+), 78 deletions(-) create mode 100644 nixcfgs/users/js0ny/programs/duti.nix diff --git a/nixcfgs/hosts/zen/brew.nix b/nixcfgs/hosts/zen/brew.nix index 496f266..797e2e9 100644 --- a/nixcfgs/hosts/zen/brew.nix +++ b/nixcfgs/hosts/zen/brew.nix @@ -1,8 +1,4 @@ -{ - config, - pkgs, - ... -}: { +{...}: { homebrew = { enable = true; brewPrefix = "/opt/homebrew/bin"; @@ -31,7 +27,6 @@ "clash-verge-rev" # Terminal Emulator - "kitty" # Fonts "font-maple-mono-nf-cn" diff --git a/nixcfgs/modules/home/darwin.nix b/nixcfgs/modules/home/darwin.nix index 4ba526f..112f4f6 100644 --- a/nixcfgs/modules/home/darwin.nix +++ b/nixcfgs/modules/home/darwin.nix @@ -20,5 +20,12 @@ i18n.inputMethod.enable = false; programs.ghostty.systemd.enable = false; - programs.ghostty.package = pkgs.ghostty-bin; + programs.ghostty.package = lib.mkForce pkgs.ghostty-bin; + + home.file.".ssh/config".text = '' + # ~/.ssh/config + Host * + UseKeychain yes + AddKeysToAgent yes + ''; } diff --git a/nixcfgs/users/js0ny/packages/catppuccin.nix b/nixcfgs/users/js0ny/packages/catppuccin.nix index b6bfe0f..1c52581 100644 --- a/nixcfgs/users/js0ny/packages/catppuccin.nix +++ b/nixcfgs/users/js0ny/packages/catppuccin.nix @@ -7,14 +7,10 @@ accents = ["pink"]; winDecStyles = ["classic"]; }; - my-catppuccin-gtk = pkgs.catppuccin-gtk.override { - accents = ["pink"]; - variant = "mocha"; - }; in { home.packages = with pkgs; [ catppuccin - my-catppuccin-gtk + # my-catppuccin-gtk my-catppuccin-kde catppuccin-fcitx5 ]; diff --git a/nixcfgs/users/js0ny/packages/cli.nix b/nixcfgs/users/js0ny/packages/cli.nix index 56180e2..7ca3ca9 100644 --- a/nixcfgs/users/js0ny/packages/cli.nix +++ b/nixcfgs/users/js0ny/packages/cli.nix @@ -10,62 +10,63 @@ }; }; - home.packages = with pkgs; [ - rclone - age - aichat - beancount - gnumake - chezmoi - cmake - curlie - duf - dust - fd - ffmpeg - glow - hyperfine - just - lazygit - lsd - pandoc - dos2unix - nushell - procs - ripgrep - ripgrep-all - tlrc - zoxide - vim - wget - git - fastfetch - fzf - kitty - zoxide - wakatime-cli - sdcv - # Langs - # lua luajit - lua51Packages.luarocks - ghostscript - # Misc ta-lib ddgr protonvpn-cli - markdown-oxide - powershell - gemini-cli - codex - imagemagick - miniserve - jq - srm - mediainfo - exiftool - ddgr # DuckDuckGo CLI - jujutsu - github-copilot-cli - yt-dlp - bluetui - asciinema - ansi2html - ]; + home.packages = with pkgs; + [ + rclone + age + aichat + beancount + gnumake + chezmoi + cmake + curlie + duf + dust + fd + ffmpeg + glow + hyperfine + just + lazygit + lsd + pandoc + dos2unix + nushell + procs + ripgrep + ripgrep-all + tlrc + zoxide + vim + wget + git + fastfetch + fzf + kitty + zoxide + wakatime-cli + sdcv + # Misc ta-lib ddgr protonvpn-cli + markdown-oxide + powershell + gemini-cli + codex + imagemagick + miniserve + jq + srm + mediainfo + exiftool + ddgr # DuckDuckGo CLI + jujutsu + github-copilot-cli + yt-dlp + asciinema + ansi2html + ] + ++ ( + if pkgs.stdenv.isDarwin + then with pkgs; [duti] + else with pkgs; [bluetui] + ); } diff --git a/nixcfgs/users/js0ny/programs/discord.nix b/nixcfgs/users/js0ny/programs/discord.nix index 010ac8e..ee1b310 100644 --- a/nixcfgs/users/js0ny/programs/discord.nix +++ b/nixcfgs/users/js0ny/programs/discord.nix @@ -14,9 +14,9 @@ plugins = { alwaysAnimate.enable = true; alwaysTrust.enable = true; - clearURLs.enable = true; + clearUrLs.enable = true; copyFileContents.enable = true; - copyUserURLs.enable = true; + copyUserUrLs.enable = true; disableCallIdle.enable = true; favoriteEmojiFirst.enable = true; forceOwnerCrown.enable = true; diff --git a/nixcfgs/users/js0ny/programs/duti.nix b/nixcfgs/users/js0ny/programs/duti.nix new file mode 100644 index 0000000..19cfe6f --- /dev/null +++ b/nixcfgs/users/js0ny/programs/duti.nix @@ -0,0 +1,31 @@ +{ + pkgs, + lib, + ... +}: let + gvim = "com.neovide.neovide"; + iina = "com.colliderli.iina"; + # firefox = "org.nixos.firefox"; + keka = "com.aone.keka"; + + defaultApps = { + "${gvim}" = ["md" "json" "js" "txt" "xml"]; + "${iina}" = ["mp4" "mkv"]; + # "${firefox}" = ["html"]; + "${keka}" = ["7z" "zip" "rar" "tar"]; + }; + + duti = "${pkgs.duti}/bin/duti"; + mkDutiCommands = app: extensions: + map (ext: "${duti} -s ${app} ${ext} all") extensions; +in { + home.packages = [pkgs.duti]; + + home.activation.setOSXDefaultApps = lib.hm.dag.entryAfter ["writeBoundary"] '' + ${ + lib.concatStringsSep "\n" ( + lib.flatten (lib.mapAttrsToList mkDutiCommands defaultApps) + ) + } + ''; +} diff --git a/nixcfgs/users/js0ny/programs/ghostty.nix b/nixcfgs/users/js0ny/programs/ghostty.nix index b022a3a..bb5a620 100644 --- a/nixcfgs/users/js0ny/programs/ghostty.nix +++ b/nixcfgs/users/js0ny/programs/ghostty.nix @@ -5,10 +5,6 @@ }: { programs.ghostty = { enable = true; - package = - if pkgs.stdenv.isLinux - then pkgs.ghostty - else pkgs.ghostty-bin; enableBashIntegration = true; enableZshIntegration = true; enableFishIntegration = true; diff --git a/nixcfgs/users/js0ny/programs/rime.nix b/nixcfgs/users/js0ny/programs/rime.nix index f5bf58e..cb0c60e 100644 --- a/nixcfgs/users/js0ny/programs/rime.nix +++ b/nixcfgs/users/js0ny/programs/rime.nix @@ -133,5 +133,54 @@ in { ''; enable = true; }; + "${rimePath}/squirrel.custom.yaml" = { + text = '' + patch: + # style/candidate_list_layout: linear + app_options: + md.obsidian: + vim_mode: true + com.neovide.neovide: + vim_mode: true + ascii_mode: true + com.microsoft.VSCode: + vim_mode: true + ascii_mode: true + com.jetbrains.rider: + vim_mode: true + ascii_mode: true + com.jetbrains.CLion: + vim_mode: true + ascii_mode: true + info.sioyek.sioyek: + ascii_mode: true + com.raycast.macos: + ascii_mode: true + net.kovidgoyal.kitty: + ascii_mode: true + vim_mode: true + com.mitchellh.ghostty: + ascii_mode: true + vim_mode: true + com.github.wez.wezterm: + ascii_mode: true + dev.zed.Zed: + vim_mode: true + ascii_mode: true + + ''; + enable = true; + }; }; + + home.activation.deployRime = + if pkgs.stdenv.isDarwin + then + lib.hm.dag.entryAfter ["writeBoundary"] '' + /Library/Input\ Methods/Squirrel.app/Contents/MacOS/Squirrel --reload + '' + else + lib.hm.entryAfter ["writeBoundary"] '' + qdbus org.fcitx.Fcitx5 /controller org.fcitx.Fcitx.Controller1.SetConfig "fcitx://onfig/addon/rime/deploy" "" + ''; } diff --git a/nixcfgs/users/js0ny/zen.nix b/nixcfgs/users/js0ny/zen.nix index 264f2bb..59e4733 100644 --- a/nixcfgs/users/js0ny/zen.nix +++ b/nixcfgs/users/js0ny/zen.nix @@ -14,6 +14,7 @@ # Programs ./programs/firefox + ./programs/emacs.nix ./programs/zed-editor.nix ./programs/rime.nix ./programs/sdcv.nix @@ -25,6 +26,10 @@ ./programs/edit-clipboard.nix ./programs/neovide.nix ./programs/ghostty.nix + ./programs/tmux.nix + ./programs/kitty.nix + # ./programs/retroarch.nix # Package broken on macOS + ./programs/duti.nix ../../modules/home/do-not-track.nix ../../modules/home/darwin.nix diff --git a/nixcfgs/users/js0ny/zephyrus.nix b/nixcfgs/users/js0ny/zephyrus.nix index 02681d2..a8d4fdc 100644 --- a/nixcfgs/users/js0ny/zephyrus.nix +++ b/nixcfgs/users/js0ny/zephyrus.nix @@ -75,8 +75,6 @@ nixpkgs.config.allowUnfree = true; - currentUser.defaultTerminalRunner = "alacritty"; - currentHost = { keyboardBacklightDevice = "asus::kbd_backlight"; keyboardBacklightStep = "1";