NixOS-Config/home-manager/shared/shell/zsh.nix

66 lines
1.3 KiB
Nix
Raw Normal View History

{
inputs,
outputs,
lib,
config,
pkgs,
...
}: {
2024-03-04 16:20:07 +01:00
programs.zoxide = {
enable = true;
};
programs.zsh = {
enable = true;
2024-03-04 16:25:09 +01:00
shellAliases = {
cd = "z";
2024-03-12 10:55:32 +01:00
code = "codium ./";
2024-04-30 11:30:44 +02:00
ls = "eza";
2024-03-12 14:03:56 +01:00
lh = "ls -lah";
2024-04-29 21:39:19 +02:00
cat = "bat";
2024-04-29 23:30:16 +02:00
tree = "tre";
2024-05-02 10:02:32 +02:00
neofetch = "hyfetch";
2024-03-04 16:25:09 +01:00
};
plugins = [
{
name = "zsh-nix-shell";
file = "nix-shell.plugin.zsh";
src = pkgs.fetchFromGitHub {
owner = "chisui";
repo = "zsh-nix-shell";
2024-01-08 23:48:14 +01:00
rev = "v0.8.0";
2024-01-08 23:56:27 +01:00
sha256 = "sha256-Z6EYQdasvpl1P78poj9efnnLj7QQg13Me8x1Ryyw+dM=";
};
}
];
2024-03-17 16:24:02 +01:00
autosuggestion.enable = true;
enableCompletion = true;
historySubstringSearch.enable = true;
syntaxHighlighting.enable = true;
2023-11-28 10:18:46 +01:00
#zsh-abbr.enable = true;
oh-my-zsh = {
enable = true;
plugins = [
"git"
"colored-man-pages"
"colorize"
"dirhistory"
"dirpersist"
2024-04-29 21:28:45 +02:00
"history"
"history-substring-search"
"fancy-ctrl-z"
"git-flow"
"isodate"
2024-03-04 16:16:34 +01:00
"z"
"zsh-interactive-cd"
"zsh-navigation-tools"
];
};
2024-04-29 23:30:16 +02:00
# stuff for zoxide & tre
2024-04-29 20:35:40 +02:00
initExtra = ''
eval "$(zoxide init --cmd cd zsh)"
2024-04-29 23:30:16 +02:00
tre() { command tre "$@" -e && source "/tmp/tre_aliases_$USER" 2>/dev/null; }
2024-04-29 20:35:40 +02:00
'';
};
}