a
This commit is contained in:
@@ -0,0 +1,117 @@
|
||||
# Shell configuration (bash, zsh, fish) with integrations
|
||||
{
|
||||
inputs,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
# Bash configuration
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
|
||||
shellAliases = {
|
||||
ll = "ls -la";
|
||||
".." = "cd ..";
|
||||
"..." = "cd ../..";
|
||||
gs = "git status";
|
||||
gd = "git diff";
|
||||
};
|
||||
};
|
||||
|
||||
# Zsh configuration
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
|
||||
shellAliases = {
|
||||
ll = "ls -la";
|
||||
".." = "cd ..";
|
||||
"..." = "cd ../..";
|
||||
gs = "git status";
|
||||
gd = "git diff";
|
||||
nix-gc = "nix-collect-garbage -d";
|
||||
};
|
||||
|
||||
history = {
|
||||
size = 10000;
|
||||
path = "${config.home.homeDirectory}/.zsh_history";
|
||||
};
|
||||
|
||||
initExtra = ''
|
||||
# Custom prompt or additional configuration
|
||||
setopt HIST_IGNORE_ALL_DUPS
|
||||
setopt HIST_FIND_NO_DUPS
|
||||
setopt HIST_REDUCE_BLANKS
|
||||
'';
|
||||
};
|
||||
|
||||
# Fish configuration
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
|
||||
shellAliases = {
|
||||
ll = "ls -la";
|
||||
".." = "cd ..";
|
||||
"..." = "cd ../..";
|
||||
gs = "git status";
|
||||
gd = "git diff";
|
||||
};
|
||||
|
||||
functions = {
|
||||
mkcd = "mkdir -p $argv[1]; and cd $argv[1]";
|
||||
};
|
||||
};
|
||||
|
||||
# Starship prompt (works with all shells)
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
settings = {
|
||||
add_newline = true;
|
||||
character = {
|
||||
success_symbol = "[➜](bold green)";
|
||||
error_symbol = "[➜](bold red)";
|
||||
};
|
||||
package.disabled = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Zoxide (better cd)
|
||||
programs.zoxide = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
enableZshIntegration = true;
|
||||
enableFishIntegration = true;
|
||||
};
|
||||
|
||||
# fzf (fuzzy finder)
|
||||
programs.fzf = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
enableZshIntegration = true;
|
||||
enableFishIntegration = true;
|
||||
};
|
||||
|
||||
# Eza (modern ls replacement)
|
||||
programs.eza = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
enableZshIntegration = true;
|
||||
enableFishIntegration = true;
|
||||
git = true;
|
||||
icons = true;
|
||||
};
|
||||
|
||||
# Bat (better cat)
|
||||
programs.bat = {
|
||||
enable = true;
|
||||
config = {
|
||||
theme = "TwoDark";
|
||||
pager = "less -FR";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user