nix-config/modules/shell/zsh.nix

59 lines
1.2 KiB
Nix

{
lib,
pkgs,
vars,
...
}: {
home-manager.users.${vars.user} = {
home.file."~/.config/zsh/.p10k.zsh" = {
source = ../../rsc/config/zsh/.p10k.zsh;
};
programs.zsh = {
enable = true;
autocd = true;
dotDir = ".config/zsh";
enableAutosuggestions = true;
enableCompletion = true;
shellAliases = {
sl = "eza";
ls = "eza";
l = "eza -l";
la = "eza -la";
ip = "ip --color=auto";
};
initExtra = ''
[[ ! -f ~/.config/zsh/.p10k.zsh ]] || source ~/.config/zsh/.p10k.zsh
nix-your-shell zsh | source /dev/stdin
'';
zplug = {
enable = true;
plugins = [
{
name = "romkatv/powerlevel10k";
tags = ["as:theme" "depth:1"];
}
];
};
plugins = [
{
name = "zsh-nix-shell";
file = "nix-shell.plugin.zsh";
src = pkgs.fetchFromGitHub {
owner = "chisui";
repo = "zsh-nix-shell";
rev = "v0.7.0";
sha256 = "149zh2rm59blr2q458a5irkfh82y3dwdich60s9670kl3cl5h2m1";
};
}
];
};
programs.fzf = {
enable = true;
enableZshIntegration = true;
};
};
}