2022-09-17 16:50:50 +02:00
|
|
|
#
|
|
|
|
# Shell
|
|
|
|
#
|
|
|
|
|
|
|
|
{ pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
programs = {
|
|
|
|
zsh = {
|
|
|
|
enable = true;
|
|
|
|
dotDir = ".config/zsh_nix";
|
2024-06-03 20:24:22 +02:00
|
|
|
autosuggestion.enable = true; # Auto suggest options and highlights syntact, searches in history for options
|
2023-06-30 13:29:07 +02:00
|
|
|
syntaxHighlighting.enable = true;
|
2022-09-17 16:50:50 +02:00
|
|
|
history.size = 10000;
|
|
|
|
|
|
|
|
oh-my-zsh = { # Extra plugins for zsh
|
|
|
|
enable = true;
|
|
|
|
plugins = [ "git" ];
|
|
|
|
custom = "$HOME/.config/zsh_nix/custom";
|
|
|
|
};
|
2022-10-09 14:01:59 +02:00
|
|
|
|
|
|
|
initExtraFirst = '' # very first inits in zshrc
|
2022-10-09 10:35:54 +02:00
|
|
|
if [[ $DISPLAY ]]; then
|
|
|
|
[[ $- != *i* ]] && return
|
2022-10-16 09:48:51 +02:00
|
|
|
[[ -z "$TMUX" ]] && (tmux attach || tmux new-session)
|
2022-10-09 10:35:54 +02:00
|
|
|
fi
|
2022-10-09 14:01:59 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
initExtra = '' # Zsh theme
|
2022-09-17 16:50:50 +02:00
|
|
|
# Spaceship
|
|
|
|
source ${pkgs.spaceship-prompt}/share/zsh/site-functions/prompt_spaceship_setup
|
|
|
|
autoload -U promptinit; promptinit
|
|
|
|
# source $HOME/.config/shell/shell_init
|
|
|
|
# Hook direnv
|
|
|
|
# emulate zsh -c "$(direnv hook zsh)"
|
|
|
|
# Swag
|
|
|
|
pfetch # Show fetch logo on terminal start
|
2023-07-07 10:57:02 +02:00
|
|
|
eval "$(direnv hook zsh)"
|
2024-07-15 21:31:44 +02:00
|
|
|
eval "$(ssh-agent)"
|
2022-09-17 16:50:50 +02:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|