Restructure shell config

This commit is contained in:
SebastianStork 2025-06-05 20:34:53 +02:00
parent e0f7a8440b
commit 097cf795fc
4 changed files with 5 additions and 1 deletions

View file

@ -1,34 +0,0 @@
{
config,
pkgs,
lib,
...
}:
{
config = lib.mkIf config.custom.programs.shell.zsh.enable {
programs.zsh = {
plugins = [
{
name = "powerlevel10k";
src = pkgs.zsh-powerlevel10k;
file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
}
{
name = "powerlevel10k-config";
src = ./.;
file = "p10k.zsh";
}
];
initContent = lib.mkBefore ''
(( ''${+commands[direnv]} )) && emulate zsh -c "$(direnv export zsh)"
if [[ -r "''${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-''${(%):-%n}.zsh" ]]; then
source "''${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-''${(%):-%n}.zsh"
fi
(( ''${+commands[direnv]} )) && emulate zsh -c "$(direnv hook zsh)"
'';
};
};
}