Files
NixVM/nixos/modules/users/zsh.nix
2025-11-21 18:29:07 +01:00

46 lines
848 B
Nix
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
pkgs,
user,
...
}: {
users.users.${user}.packages = with pkgs; [
fzf
];
# ZSH configuration
programs.zsh = {
enable = true;
enableCompletion = true;
autosuggestions.enable = true;
syntaxHighlighting.enable = true;
histSize = 10000;
histFile = "$HOME/.zsh_history";
setOptions = [
"HIST_IGNORE_ALL_DUPS"
"APPEND_HISTORY"
"SHARE_HISTORY"
"HIST_IGNORE_SPACE"
"EXTENDED_GLOB"
"CORRECT"
# "PROMPT_SUBST"
];
shellInit = ''
eval "$(fzf --zsh)"
alias ..="cd .."
alias ...="cd ../.."
bindkey -e
# export %# '
'';
promptInit = ''
PS1='%{%F{green}%}%n@%m %{%F{blue}%}%~%{%f%}%{%F{white}%} %# '
'';
};
# Setting aliases
environment.shellAliases = {
ls = "ls -l --color --hyperlink=auto";
};
}