configuration.nix/home/laptop/programs/zsh.nix

39 lines
917 B
Nix
Raw Normal View History

2023-08-09 22:10:48 +02:00
{ pkgs, lib, ... }: {
programs.zsh = {
enable = true;
syntaxHighlighting.enable = true;
enableAutosuggestions = true;
loginExtra = ''
[ "$(tty)" = "/dev/tty1" ] && exec sway
'';
shellAliases = {
gad = "git add . && git diff --cached";
gac = "ga && gc";
2023-09-16 12:04:43 +02:00
gach = "gac -C HEAD";
2023-08-09 22:10:48 +02:00
ga = "git add .";
gc = "git commit";
dev = "nix develop --command $SHELL";
};
history = {
size = 1000;
save = 1000;
expireDuplicatesFirst = true;
};
plugins = [
{
name = "zsh-powerlevel10k";
src = "${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k";
file = "powerlevel10k.zsh-theme";
}
{
name = "zsh-nix-shell";
file = "nix-shell.plugin.zsh";
src = "${pkgs.zsh-nix-shell}/share/zsh-nix-shell";
}
];
initExtra = ''
source "$HOME/.p10k.zsh"
'';
};
}