devos/users/profiles/zsh/default.nix
2021-04-16 11:03:26 +02:00

33 lines
779 B
Nix

{ pkgs, ... }:
{
programs.zsh = {
enable = true;
zplug = {
enable = true;
plugins = [
{ name = "romkatv/powerlevel10k"; tags = [ "as:theme" "depth:1" ]; }
{ name = "chisui/zsh-nix-shell"; }
];
};
initExtraFirst = ''
if [ -z "$TMUX" ] && [[ $- == *i* ]]
then
(tmux ls | grep -vq attached && tmux at) || tmux
if [ ! -f /tmp/dontdie ]
then
exit
fi
rm /tmp/dontdie
fi
${builtins.readFile ./p10k.zsh.initfirst}
'';
initExtra = ''
source "${pkgs.fzf}/share/fzf/key-bindings.zsh"
source "${pkgs.fzf}/share/fzf/completion.zsh"
${builtins.readFile ./p10k.zsh}
'';
};
programs.direnv.enableZshIntegration = true;
}