2018-10-31 19:52:39 +01:00
|
|
|
{ pkgs
|
|
|
|
, config
|
|
|
|
, ...
|
|
|
|
}:
|
|
|
|
|
2018-11-03 11:45:40 +01:00
|
|
|
let
|
2018-10-31 19:52:39 +01:00
|
|
|
in {
|
|
|
|
programs.zsh = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
# will be called again by oh-my-zsh
|
|
|
|
enableCompletion = false;
|
|
|
|
enableAutosuggestions = true;
|
|
|
|
initExtra = ''
|
|
|
|
PROMPT='%F{%(!.red.green)}%n%f@%m %(?.%F{green}✓%f.%F{red}✗ ($?%))%f %F{blue}%~%f %F{magenta}$(git_prompt_info)%f
|
|
|
|
%_%F{%(!.red.green)}$(prompt_char)%f '
|
|
|
|
RPROMPT=""
|
|
|
|
|
2018-11-03 11:45:40 +01:00
|
|
|
# Automatic rehash
|
2018-10-31 19:52:39 +01:00
|
|
|
zstyle ':completion:*' rehash true
|
|
|
|
|
|
|
|
if [ -f $HOME/.shrc.d/sh_aliases ]; then
|
2018-11-03 11:45:40 +01:00
|
|
|
. $HOME/.shrc.d/sh_aliases
|
2018-10-31 19:52:39 +01:00
|
|
|
fi
|
|
|
|
|
2018-11-03 11:45:40 +01:00
|
|
|
${if builtins.hasAttr "homeshick" pkgs then ''
|
|
|
|
source ${pkgs.homeshick}/homeshick.sh
|
|
|
|
fpath=(${pkgs.homeshick}/completions $fpath)
|
|
|
|
'' else ''
|
|
|
|
''}
|
2018-10-31 19:52:39 +01:00
|
|
|
|
|
|
|
# Disable intercepting of ctrl-s and ctrl-q as flow control.
|
|
|
|
stty stop ''' -ixoff -ixon
|
|
|
|
|
|
|
|
# don't cd into directories when executed
|
|
|
|
unsetopt AUTO_CD
|
|
|
|
'';
|
|
|
|
|
|
|
|
sessionVariables = {
|
|
|
|
# Add more envrionment variables here
|
|
|
|
};
|
|
|
|
|
|
|
|
plugins = [
|
|
|
|
{
|
|
|
|
# will source zsh-autosuggestions.plugin.zsh
|
|
|
|
name = "zsh-autosuggestions";
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
owner = "zsh-users";
|
|
|
|
repo = "zsh-autosuggestions";
|
|
|
|
rev = "v0.4.0";
|
|
|
|
sha256 = "0z6i9wjjklb4lvr7zjhbphibsyx51psv50gm07mbb0kj9058j6kc";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "enhancd";
|
|
|
|
file = "init.sh";
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
owner = "b4b4r07";
|
|
|
|
repo = "enhancd";
|
|
|
|
rev = "v2.2.1";
|
|
|
|
sha256 = "0iqa9j09fwm6nj5rpip87x3hnvbbz9w9ajgm6wkrd5fls8fn8i5g";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "pass";
|
|
|
|
src = "${pkgs.oh-my-zsh}/share/oh-my-zsh/plugins/pass";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "minikube";
|
|
|
|
src = "${pkgs.oh-my-zsh}/share/oh-my-zsh/plugins/minikube";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
oh-my-zsh = {
|
|
|
|
enable = true;
|
|
|
|
theme = "tjkirch";
|
|
|
|
plugins = [
|
|
|
|
"git"
|
|
|
|
"sudo"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|