nixos/programs/zsh.nix
2024-06-19 13:28:03 +02:00

36 lines
820 B
Nix

{ config, lib, pkgs, ... }:
{
programs.zsh = {
enable = true;
enableCompletion = true;
autosuggestion.enable = true;
enableVteIntegration = true;
syntaxHighlighting.enable = true;
history.path = "${config.xdg.dataHome}/zsh/history";
initExtra = ''
# [Ctrl-RightArrow]
bindkey '^[[1;5C' forward-word
# [Ctrl-LeftArrow]
bindkey '^[[1;5D' backward-word
alias hsw='home-manager switch'
'';
envExtra = ''
export PATH="${config.xdg.configHome}/emacs/bin:$PATH"
'';
plugins = [
{
name = "powerlevel10k";
src = pkgs.zsh-powerlevel10k;
file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
}
{
name = "powerlevel10k-config";
src = lib.cleanSource ./p10k-config;
file = "p10k.zsh";
}
];
};
}