Files
nixos-config/home/programs/zsh/default.nix
2024-02-29 13:24:08 +01:00

35 lines
769 B
Nix

{ pkgs, config, ... }:
{
home.packages = with pkgs; [
git
python3
zsh-nix-shell
nix-zsh-completions
];
programs.zsh = {
enable = true;
shellAliases = {
update = "sudo nixos-rebuild switch";
};
enableAutosuggestions = true;
enableCompletion = true;
enableVteIntegration = true;
history = {
expireDuplicatesFirst = true;
size = 100000000000;
path = "${config.xdg.dataHome}/zsh/zsh/history";
};
syntaxHighlighting = {
enable = true;
};
initExtra = ''
PROMPT='%F{green}%n%f@%F{magenta}%m%f %F{blue}%B%~%b%f %# '
RPROMPT='[%F{yellow}%?%f]'
bindkey "^[[A" history-beginning-search-backward
bindkey "^[[B" history-beginning-search-forward
'';
};
}