1
0
Fork 0
nixos-config/home-manager/roles/zsh/default.nix
2023-01-01 16:46:33 +01:00

40 lines
1.1 KiB
Nix

{pkgs, ...}: {
programs.zsh = {
enable = true;
enableAutosuggestions = true;
enableCompletion = true;
history = {
path = "$HOME/.persist/.zsh_history";
extended = true;
ignoreDups = true;
share = true;
save = 10000000;
size = 10000000;
};
# Workaround for the limitation that gnome unsets some variables for following sessions (like EDITOR) but __HM_SESS_VARS_SOURCED apparently not.
initExtraFirst = ''
export __HM_SESS_VARS_SOURCED=""
'';
initExtra = ''
${builtins.readFile ./zshrc}
source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme
source ${./p10k.zsh}
set inc_append_history
'';
oh-my-zsh = {
enable = true;
plugins = ["colored-man-pages"];
};
plugins = [
{
name = "you-should-use";
src = "${pkgs.zsh-you-should-use}/share/zsh/plugins/you-should-use";
}
{
name = "zsh-nix-shell";
file = "nix-shell.plugin.zsh";
src = "${pkgs.zsh-nix-shell}/share/zsh-nix-shell";
}
];
};
}