- Create separate zsh.nix module for enhanced shell experience - Add Powerlevel10k theme with custom configuration from wizard - Include useful aliases for git, nix, and navigation commands - Add modern CLI tools: fzf, fd, ripgrep, bat for better productivity - Enable autosuggestions, syntax highlighting, and completion - Add portable p10k.zsh configuration for consistent prompt across machines - Update flake.nix to import zsh module and remove inline config - Update tmux.nix with prefix indicator and datetime removal 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
64 lines
No EOL
1.4 KiB
Nix
64 lines
No EOL
1.4 KiB
Nix
{ pkgs, ... }:
|
|
|
|
{
|
|
programs.zsh = {
|
|
enable = true;
|
|
defaultKeymap = "viins";
|
|
enableVteIntegration = true;
|
|
enableCompletion = true;
|
|
autosuggestion.enable = true;
|
|
syntaxHighlighting.enable = true;
|
|
|
|
sessionVariables = {
|
|
COLORTERM = "truecolor";
|
|
EDITOR = "nvim";
|
|
};
|
|
|
|
shellAliases = {
|
|
ll = "ls -alF";
|
|
la = "ls -A";
|
|
l = "ls -CF";
|
|
".." = "cd ..";
|
|
"..." = "cd ../..";
|
|
|
|
# Git aliases
|
|
gs = "git status";
|
|
ga = "git add";
|
|
gc = "git commit";
|
|
gp = "git push";
|
|
gl = "git pull";
|
|
gd = "git diff";
|
|
|
|
# Nix helpers
|
|
hm = "home-manager";
|
|
hms = "home-manager switch --flake ~/.config/nix#yanlin";
|
|
};
|
|
|
|
initExtra = ''
|
|
# Load Powerlevel10k theme
|
|
if [[ -f ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme ]]; then
|
|
source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme
|
|
fi
|
|
|
|
# Load Powerlevel10k configuration (managed by Nix)
|
|
source ~/.p10k.zsh
|
|
'';
|
|
};
|
|
|
|
# Essential packages for enhanced zsh experience
|
|
home.packages = with pkgs; [
|
|
zsh-powerlevel10k
|
|
fzf
|
|
fd
|
|
ripgrep
|
|
bat
|
|
];
|
|
|
|
programs.fzf = {
|
|
enable = true;
|
|
enableZshIntegration = true;
|
|
};
|
|
|
|
# Manage Powerlevel10k configuration
|
|
home.file.".p10k.zsh".source = ./p10k.zsh;
|
|
} |