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

41 lines
985 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
'';
2023-10-02 09:45:49 +02:00
sessionVariables = {
PASSWORD_STORE_DIR = "$HOME/.password-store";
};
2023-08-09 22:10:48 +02:00
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";
2023-09-28 14:12:11 +02:00
la = "ls -alh";
2023-08-09 22:10:48 +02:00
};
history = {
expireDuplicatesFirst = true;
};
plugins = [
{
name = "zsh-powerlevel10k";
src = "${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k";
file = "powerlevel10k.zsh-theme";
}
2023-10-02 15:52:02 +02:00
{
name = "zsh-nix-shell";
file = "nix-shell.plugin.zsh";
src = "${pkgs.zsh-nix-shell}/share/zsh-nix-shell";
}
2023-08-09 22:10:48 +02:00
];
initExtra = ''
source "$HOME/.p10k.zsh"
'';
};
}