nixos-combined-flake/modules/home-manager/shell/zsh/default.nix

47 lines
1.2 KiB
Nix

{ config, lib, ... }: lib.mkIf config.programs.zsh.enable {
programs = {
zsh = {
defaultKeymap = "emacs";
dotDir = ".config/zsh";
shellAliases = {
j = "z";
ji = "zi";
};
initExtra = builtins.readFile ../../../../configs/home-manager/zsh/zshrc.zsh;
autosuggestion.enable = true;
completionInit = ''
autoload -U compinit bashcompinit
compinit
bashcompinit'';
history = {
path = "${config.xdg.cacheHome}/zsh_history";
save = 100000;
size = 100000;
share = true;
extended = true;
};
historySubstringSearch = {
enable = true;
searchDownKey = [
"^[[B"
];
searchUpKey = [
"^[[A"
];
};
zplug = {
enable = true;
plugins = [
{ name = "zdharma-continuum/fast-syntax-highlighting"; }
{ name = "nix-community/nix-zsh-completions"; }
{ name = "zsh-users/zsh-completions"; }
];
};
envExtra = ''
export DIRENV_LOG_FORMAT=$'\033[2mdirenv: %s\033[0m'
export DOOMWADDIR=$HOME/Games/doom/IWADs
'';
};
};
}