devos/users/profiles/zsh/default.nix

36 lines
756 B
Nix
Raw Permalink Normal View History

2021-04-11 18:00:14 +02:00
{ pkgs, ... }:
2021-04-10 14:46:40 +02:00
{
programs.zsh = {
enable = true;
2021-10-08 17:37:07 +02:00
defaultKeymap = "viins";
2021-04-10 14:46:40 +02:00
zplug = {
enable = true;
plugins = [
{ name = "romkatv/powerlevel10k"; tags = [ "as:theme" "depth:1" ]; }
];
};
initExtraFirst = ''
2021-04-16 11:03:26 +02:00
if [ -z "$TMUX" ] && [[ $- == *i* ]]
then
2021-09-07 18:53:22 +02:00
tmux
2021-04-16 11:03:26 +02:00
if [ ! -f /tmp/dontdie ]
2021-04-11 18:04:01 +02:00
then
2021-04-16 11:03:26 +02:00
exit
2021-04-11 18:04:01 +02:00
fi
2021-04-16 11:03:26 +02:00
rm /tmp/dontdie
fi
2021-04-10 21:12:06 +02:00
2021-04-16 11:03:26 +02:00
${builtins.readFile ./p10k.zsh.initfirst}
2021-04-10 14:46:40 +02:00
'';
initExtra = ''
2021-04-11 18:04:01 +02:00
source "${pkgs.fzf}/share/fzf/key-bindings.zsh"
source "${pkgs.fzf}/share/fzf/completion.zsh"
2021-04-11 18:00:14 +02:00
2021-04-11 18:04:01 +02:00
${builtins.readFile ./p10k.zsh}
2021-04-10 14:46:40 +02:00
'';
2022-09-19 12:38:27 +02:00
2021-04-10 14:46:40 +02:00
};
2021-04-13 09:03:00 +02:00
programs.direnv.enableZshIntegration = true;
2022-09-19 12:38:27 +02:00
home.packages = [ pkgs.fzf ];
2021-04-10 14:46:40 +02:00
}