niksos/homes/jacek/cli/zsh.nix
2023-08-01 14:21:45 +02:00

54 lines
1.8 KiB
Nix

{
config,
pkgs,
...
}: {
config = {
programs.zsh = {
enable = true;
shellAliases = {
cl = "clear";
cp = "cp -ivr";
mv = "mv -iv";
rm = "trash -v";
l = "ls -A --color=auto";
e = "exa -lha --git";
untar = "tar -xvf";
untargz = "tar -xzf";
mnt = "udisksctl mount -b";
umnt = "udisksctl unmount -b";
v = "nvim";
kys = "shutdown now";
gpl = "curl https://www.gnu.org/licenses/gpl-3.0.txt -o LICENSE";
agpl = "curl https://www.gnu.org/licenses/agpl-3.0.txt -o LICENSE";
wget = "wget --hsts-file=\"${config.xdg.dataHome}/wget-hsts\"";
g = "git";
};
initExtra = ''
bindkey '^H' backward-kill-word
'';
history = {
path = "${config.xdg.dataHome}/zsh/zsh_history";
size = 999999999;
extended = true;
ignoreSpace = true;
};
enableAutosuggestions = true;
enableCompletion = true;
autocd = false;
dotDir = ".config/zsh";
plugins = [
{
name = "fast-syntax-highlighting";
file = "fast-syntax-highlighting.plugin.zsh";
src = pkgs.fetchFromGitHub {
owner = "zdharma-continuum";
repo = "fast-syntax-highlighting";
rev = "cf318e06a9b7c9f2219d78f41b46fa6e06011fd9";
sha256 = "sha256-RVX9ZSzjBW3LpFs2W86lKI6vtcvDWP6EPxzeTcRZua4=";
};
}
];
};
};
}