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

71 lines
1.7 KiB
Nix
Raw Permalink Normal View History

{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-05-08 14:57:34 +02:00
shutdown = "shutdown 0";
reboot = "reboot 0";
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=";
};
}
{
name = "terraform";
src = pkgs.fetchFromGitHub {
owner = "macunha1";
repo = "zsh-terraform";
rev = "fd1471d3757f8ed13f56c4426f88616111de2a87";
sha256 = "0z6i9wjjklb4lvr7zjhbphibsyx51psv50gm07mbb0kj9058j6kc";
};
}
];
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"
];
};
# Extra commands that take more complex forms
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-10-16 21:47:40 +02:00
zhx() { command zellij action new-tab --layout $HOME/.config/zellij/layouts/helix.kdl; }
2024-04-29 20:35:40 +02:00
'';
};
}