Files
nix-config/home/shell/tools.nix
T
imbytecat 68184abd8f refactor: 重构为三设备架构,zsh 迁移至 fish
- 新增 darwinConfigurations: mac-mini, macbook-air (aarch64-darwin)
- WSL 统一用户名为 imbytecat,主机名改为 awesome-* 系列
- zsh 全面迁移至 fish (abbrs, 内置补全/高亮, zoxide --cmd cd)
- 激活 nix-darwin 模块: Homebrew, 系统偏好, Touch ID sudo
- 移除 bare/standalone 配置及 catppuccin nixosModule from mkDarwin
2026-04-10 21:48:19 +08:00

94 lines
2.8 KiB
Nix

{ pkgs, ... }:
{
# ── FZF ──────────────────────────────────────────────
programs.fzf = {
enable = true;
enableFishIntegration = true;
defaultCommand = "fd --type f --hidden --follow --exclude .git";
defaultOptions = [
"--height=40%"
"--layout=reverse"
"--border"
"--info=inline"
];
changeDirWidgetCommand = "fd --type d --hidden --follow --exclude .git";
fileWidgetCommand = "fd --type f --hidden --follow --exclude .git";
fileWidgetOptions = [
"--preview 'bat --color=always --style=numbers --line-range=:200 {} 2>/dev/null || eza -la {}'"
];
};
# ── Atuin (shell history) ────────────────────────────
programs.atuin = {
enable = true;
enableFishIntegration = true;
settings = {
enter_accept = true;
filter_mode = "host";
filter_mode_shell_up_key_binding = "session";
style = "compact";
inline_height = 20;
show_help = false;
};
};
# ── Zoxide (smart cd) ───────────────────────────────
programs.zoxide = {
enable = true;
enableFishIntegration = true;
options = [ "--cmd cd" ]; # cd/cdi instead of z/zi
};
# ── Direnv + nix-direnv ─────────────────────────────
programs.direnv = {
enable = true;
enableFishIntegration = true;
nix-direnv.enable = true;
config.global = {
warn_timeout = "120s";
};
};
# ── Bat (cat replacement) ───────────────────────────
programs.bat = {
enable = true;
extraPackages = with pkgs.bat-extras; [
batgrep
batwatch
];
};
# ── Eza (ls replacement) ────────────────────────────
programs.eza = {
enable = true;
enableFishIntegration = false; # we use custom abbrs in fish.nix
git = true;
icons = "auto";
extraOptions = [
"--color=always"
"--group-directories-first"
];
};
# ── Yazi (file manager) ─────────────────────────────
programs.yazi = {
enable = true;
enableFishIntegration = true;
};
# ── Btop (system monitor) ───────────────────────────
programs.btop = {
enable = true;
settings = {
vim_keys = true;
};
};
# ── Ripgrep / FD ────────────────────────────────────
home.packages = with pkgs; [
ripgrep
fd
];
}