- Add direnv module with nix-direnv integration, replacing manual hook - Disable starship's add_newline for more compact prompt - Clean up comments across CLI features for better readability
56 lines
1 KiB
Nix
56 lines
1 KiB
Nix
{pkgs, ...}: {
|
|
imports = [
|
|
./direnv.nix
|
|
./starship.nix
|
|
];
|
|
|
|
home.packages = with pkgs; [
|
|
fzf # command-line fuzzy finder
|
|
];
|
|
|
|
programs.zsh = {
|
|
enable = true;
|
|
|
|
# Enable extra features
|
|
autosuggestion = {
|
|
enable = true;
|
|
};
|
|
syntaxHighlighting = {
|
|
enable = true;
|
|
};
|
|
enableCompletion = true;
|
|
|
|
# Configuration directory
|
|
dotDir = ".config/zsh";
|
|
|
|
shellAliases = {
|
|
# Single letter aliases
|
|
c = "clear";
|
|
v = "nvim";
|
|
|
|
# Double letter aliases
|
|
la = "ls -a";
|
|
ll = "ls -l";
|
|
};
|
|
|
|
# Install plugins
|
|
plugins = [
|
|
{ # vi(vim) mode for ZSH
|
|
name = "zsh-vi-mode";
|
|
src = "${pkgs.zsh-vi-mode}/share/zsh-vi-mode";
|
|
}
|
|
|
|
{ # replace zsh's completion with fzf
|
|
name = "fzf-tab";
|
|
src = "${pkgs.zsh-fzf-tab}/share/fzf-tab";
|
|
}
|
|
];
|
|
|
|
# Extra commands that should be added to '.zshrc'
|
|
initContent = ''
|
|
bindkey "^[[1;5C" forward-word
|
|
bindkey "^[[1;5D" backward-word
|
|
export PATH
|
|
'';
|
|
};
|
|
}
|