rebuild on darwin

This commit is contained in:
js0ny 2025-11-22 20:38:22 +00:00
parent 6f3f19ee86
commit 85b644c512
10 changed files with 156 additions and 78 deletions

View file

@ -1,8 +1,4 @@
{ {...}: {
config,
pkgs,
...
}: {
homebrew = { homebrew = {
enable = true; enable = true;
brewPrefix = "/opt/homebrew/bin"; brewPrefix = "/opt/homebrew/bin";
@ -31,7 +27,6 @@
"clash-verge-rev" "clash-verge-rev"
# Terminal Emulator # Terminal Emulator
"kitty"
# Fonts # Fonts
"font-maple-mono-nf-cn" "font-maple-mono-nf-cn"

View file

@ -20,5 +20,12 @@
i18n.inputMethod.enable = false; i18n.inputMethod.enable = false;
programs.ghostty.systemd.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
'';
} }

View file

@ -7,14 +7,10 @@
accents = ["pink"]; accents = ["pink"];
winDecStyles = ["classic"]; winDecStyles = ["classic"];
}; };
my-catppuccin-gtk = pkgs.catppuccin-gtk.override {
accents = ["pink"];
variant = "mocha";
};
in { in {
home.packages = with pkgs; [ home.packages = with pkgs; [
catppuccin catppuccin
my-catppuccin-gtk # my-catppuccin-gtk
my-catppuccin-kde my-catppuccin-kde
catppuccin-fcitx5 catppuccin-fcitx5
]; ];

View file

@ -10,7 +10,8 @@
}; };
}; };
home.packages = with pkgs; [ home.packages = with pkgs;
[
rclone rclone
age age
aichat aichat
@ -45,10 +46,6 @@
zoxide zoxide
wakatime-cli wakatime-cli
sdcv sdcv
# Langs
# lua luajit
lua51Packages.luarocks
ghostscript
# Misc ta-lib ddgr protonvpn-cli # Misc ta-lib ddgr protonvpn-cli
markdown-oxide markdown-oxide
powershell powershell
@ -64,8 +61,12 @@
jujutsu jujutsu
github-copilot-cli github-copilot-cli
yt-dlp yt-dlp
bluetui
asciinema asciinema
ansi2html ansi2html
]; ]
++ (
if pkgs.stdenv.isDarwin
then with pkgs; [duti]
else with pkgs; [bluetui]
);
} }

View file

@ -14,9 +14,9 @@
plugins = { plugins = {
alwaysAnimate.enable = true; alwaysAnimate.enable = true;
alwaysTrust.enable = true; alwaysTrust.enable = true;
clearURLs.enable = true; clearUrLs.enable = true;
copyFileContents.enable = true; copyFileContents.enable = true;
copyUserURLs.enable = true; copyUserUrLs.enable = true;
disableCallIdle.enable = true; disableCallIdle.enable = true;
favoriteEmojiFirst.enable = true; favoriteEmojiFirst.enable = true;
forceOwnerCrown.enable = true; forceOwnerCrown.enable = true;

View file

@ -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)
)
}
'';
}

View file

@ -5,10 +5,6 @@
}: { }: {
programs.ghostty = { programs.ghostty = {
enable = true; enable = true;
package =
if pkgs.stdenv.isLinux
then pkgs.ghostty
else pkgs.ghostty-bin;
enableBashIntegration = true; enableBashIntegration = true;
enableZshIntegration = true; enableZshIntegration = true;
enableFishIntegration = true; enableFishIntegration = true;

View file

@ -133,5 +133,54 @@ in {
''; '';
enable = true; 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" ""
'';
} }

View file

@ -14,6 +14,7 @@
# Programs # Programs
./programs/firefox ./programs/firefox
./programs/emacs.nix
./programs/zed-editor.nix ./programs/zed-editor.nix
./programs/rime.nix ./programs/rime.nix
./programs/sdcv.nix ./programs/sdcv.nix
@ -25,6 +26,10 @@
./programs/edit-clipboard.nix ./programs/edit-clipboard.nix
./programs/neovide.nix ./programs/neovide.nix
./programs/ghostty.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/do-not-track.nix
../../modules/home/darwin.nix ../../modules/home/darwin.nix

View file

@ -75,8 +75,6 @@
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
currentUser.defaultTerminalRunner = "alacritty";
currentHost = { currentHost = {
keyboardBacklightDevice = "asus::kbd_backlight"; keyboardBacklightDevice = "asus::kbd_backlight";
keyboardBacklightStep = "1"; keyboardBacklightStep = "1";