pantheon/modules/programs/zsh.nix
2025-03-31 04:41:56 +08:00

36 lines
809 B
Nix

{
pkgs,
config,
...
}:
{
programs.zsh = {
enable = true;
};
users.defaultUserShell = pkgs.zsh;
environment.pathsToLink = [ "/share/zsh" ]; # enables completion
home-manager.users.rafiq = {
programs.zsh = {
enable = true;
enableCompletion = true;
enableVteIntegration = true;
dirHashes = {
repos = "$HOME/GitRepos";
dl = "$HOME/Downloads";
};
initContent = # zsh
''
# Bind CTRL+Backspace to delete whole word
bindkey '^H' backward-kill-word
'';
# TODO: Look into whether we need to add the history attribute
plugins = [
{
name = "vi-mode";
src = pkgs.zsh-vi-mode;
file = "share/zsh-vi-mode/zsh-vi-mode.plugin.zsh";
}
];
};
};
}