home-manager/shell/zsh.nix
2023-10-10 22:04:59 -04:00

59 lines
1.2 KiB
Nix

{ config, pkgs, inputs, ... }:
{
programs.zsh = {
enable = true;
enableAutosuggestions = true;
enableCompletion = true;
syntaxHighlighting.enable = true;
autocd = true;
defaultKeymap = null;
dotDir = ".config/zsh";
history = {
ignoreSpace = true;
path = "${config.xdg.dataHome}/zsh/zsh_history";
save = 10000;
};
historySubstringSearch.enable = true;
plugins = [
{
name = "powerlevel10k";
file = "powerlevel10k.zsh-theme";
src = pkgs.fetchFromGitHub {
owner = "romkatv";
repo = "powerlevel10k";
rev = "v1.19.0";
sha256 = "+hzjSbbrXr0w1rGHm6m2oZ6pfmD6UUDBfPd7uMg5l5c=";
};
}
];
shellAliases = {
ls = "eza";
la = "eza -la";
l = "eza -l";
};
initExtra = ''
source ~/.config/zsh/.p10k.zsh
'';
localVariables = {
POWERLEVEL9K_DISABLE_CONFIGURATION_WIZARD = true;
};
};
# oh-my-zsh = {
# enable = true;
# plugins = [
# "z"
# "git"
# "vi-mode"
# "thefuck"
# ];
# theme = "bira"; # TODO: figure out how to source custom theme
# # other cool themes:
# # duellj
# # simonoff
# # strug
# # bira
# };
home.file.".config/zsh/.p10k.zsh".source = ./.p10k.zsh;
}