2023-11-19 23:12:21 +01:00
|
|
|
{
|
|
|
|
inputs,
|
|
|
|
outputs,
|
|
|
|
lib,
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}: {
|
2024-03-04 16:20:07 +01:00
|
|
|
programs.zoxide = {
|
|
|
|
enable = true;
|
|
|
|
};
|
|
|
|
|
2023-11-19 23:12:21 +01:00
|
|
|
programs.zsh = {
|
|
|
|
enable = true;
|
2024-03-04 16:25:09 +01:00
|
|
|
shellAliases = {
|
2024-03-04 16:26:40 +01:00
|
|
|
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
|
|
|
};
|
2023-11-19 23:12:21 +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=";
|
2023-11-19 23:12:21 +01:00
|
|
|
};
|
|
|
|
}
|
2024-08-29 13:58:18 +02:00
|
|
|
{
|
|
|
|
name = "terraform";
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
owner = "macunha1";
|
|
|
|
repo = "zsh-terraform";
|
|
|
|
rev = "fd1471d3757f8ed13f56c4426f88616111de2a87";
|
|
|
|
sha256 = "0z6i9wjjklb4lvr7zjhbphibsyx51psv50gm07mbb0kj9058j6kc";
|
|
|
|
};
|
|
|
|
}
|
2023-11-19 23:12:21 +01:00
|
|
|
];
|
2024-03-17 16:24:02 +01:00
|
|
|
autosuggestion.enable = true;
|
2023-11-19 23:12:21 +01:00
|
|
|
enableCompletion = true;
|
|
|
|
historySubstringSearch.enable = true;
|
|
|
|
syntaxHighlighting.enable = true;
|
2023-11-28 10:18:46 +01:00
|
|
|
#zsh-abbr.enable = true;
|
2023-11-19 23:12:21 +01:00
|
|
|
oh-my-zsh = {
|
|
|
|
enable = true;
|
|
|
|
plugins = [
|
|
|
|
"git"
|
|
|
|
"colored-man-pages"
|
|
|
|
"colorize"
|
2024-04-30 10:05:52 +02:00
|
|
|
"dirhistory"
|
|
|
|
"dirpersist"
|
2024-04-29 21:28:45 +02:00
|
|
|
"history"
|
|
|
|
"history-substring-search"
|
2023-11-19 23:12:21 +01:00
|
|
|
"fancy-ctrl-z"
|
|
|
|
"git-flow"
|
|
|
|
"isodate"
|
2024-03-04 16:16:34 +01:00
|
|
|
"z"
|
2024-04-30 10:05:52 +02:00
|
|
|
"zsh-interactive-cd"
|
|
|
|
"zsh-navigation-tools"
|
2023-11-19 23:12:21 +01:00
|
|
|
];
|
|
|
|
};
|
2024-10-18 17:43:10 +02:00
|
|
|
# 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
|
|
|
'';
|
2023-11-19 23:12:21 +01:00
|
|
|
};
|
|
|
|
}
|