caenix/modules/home/caem/core/zsh.nix
2025-01-24 03:07:33 +01:00

57 lines
1.2 KiB
Nix

{ pkgs, config, ... }:
{
home.packages = with pkgs; [
lsd
bat
fd
ripgrep
fzf
tmux
fastfetch
];
programs.bat = {
enable = true;
settings.config = "ansi";
};
home.file.".zshenv".enable = false;
programs.zsh = {
enable = true;
enableCompletion = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
dotDir = ".config/zsh";
autocd = true;
history.size = 10000;
history.ignoreAllDups = true;
/* Not persisted on purpose */
history.path = "${config.xdg.cacheHome}/zsh_history";
shellAliases = {
cat = "bat --paging=never";
ls = "lsd";
ll = "lsd -lah";
};
initExtra = ''
alias -g -- -h='-h 2>&1 | bat --language=help --style=plain'
alias -g -- --help='--help 2>&1 | bat --language=help --style=plain'
'';
plugins = [
{
name = "zsh-nix-shell";
file = "nix-shell.plugin.zsh";
src = pkgs.fetchFromGitHub {
owner = "chisui";
repo = "zsh-nix-shell";
rev = "v0.8.0";
sha256 = "1lzrn0n4fxfcgg65v0qhnj7wnybybqzs4adz7xsrkgmcsr0ii8b7";
};
}
];
};
}