devos/users/profiles/zsh/default.nix
2022-09-19 12:38:27 +02:00

35 lines
756 B
Nix

{ pkgs, ... }:
{
programs.zsh = {
enable = true;
defaultKeymap = "viins";
zplug = {
enable = true;
plugins = [
{ name = "romkatv/powerlevel10k"; tags = [ "as:theme" "depth:1" ]; }
];
};
initExtraFirst = ''
if [ -z "$TMUX" ] && [[ $- == *i* ]]
then
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;
home.packages = [ pkgs.fzf ];
}