Files
nixos-config/home/common/programs/zsh.nix
T
Miguel Palhas 5256730fe1 code review
2024-10-04 17:35:03 +01:00

60 lines
1.1 KiB
Nix

{ inputs, config, pkgs, ... }: {
programs.zsh = {
enable = true;
enableCompletion = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
shellAliases = {
c = "cargo";
d = "docker";
dc = "docker compose";
g = "git";
n = "nvim";
vim = "nvim";
mm = "mise";
mr = "mise run";
ls = "eza";
cat = "bat";
ps = "procs";
# cd
".." = "cd ..";
"..2" = "cd ../..";
"..3" = "cd ../../..";
};
history = {
size = 10000;
path = "${config.xdg.dataHome}/zsh/history";
};
zplug = {
enable = true;
plugins =
[ { name = "hlissner/zsh-autopair"; } { name = "Aloxaf/fzf-tab"; } ];
};
initExtra = ''
# mise
eval "$(mise activate zsh)"
# asdf
${pkgs.asdf-vm}/share/asdf-vm/asdf.sh
'';
};
programs.fzf = {
enable = true;
enableZshIntegration = true;
};
programs.starship = {
enable = true;
settings = { add_newline = true; };
};
home.sessionPath =
[ "./.git/safe/../../node_modules/.bin" "./.git/safe/../../bin" ];
}