Add initial zsh implementation

This commit is contained in:
GHOSCHT 2023-12-04 16:15:14 +01:00
parent ae1e85b8cb
commit a6b4364dac
Signed by: ghoscht
GPG key ID: 2C2C1C62A5388E82
2 changed files with 55 additions and 0 deletions

View file

@ -1,4 +1,5 @@
[
./git.nix
./fish.nix
./zsh.nix
]

54
modules/shell/zsh.nix Normal file
View file

@ -0,0 +1,54 @@
{
lib,
pkgs,
vars,
...
}: {
home-manager.users.${vars.user} = {
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 ~/.p10k.zsh ]] || source ~/.p10k.zsh
'';
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;
};
};
}