Fix misplaced config

This commit is contained in:
SebastianStork 2024-06-10 00:07:30 +02:00
parent 1844988bf2
commit 2f4d4d1866
2 changed files with 24 additions and 22 deletions

View file

@ -35,16 +35,6 @@
} }
]; ];
initExtraFirst = ''
(( ''${+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)"
'';
initExtra = '' initExtra = ''
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-Z}' zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-Z}'
zstyle ':completion:*' list-colors ''${(s.:.)LS_COLORS} zstyle ':completion:*' list-colors ''${(s.:.)LS_COLORS}

View file

@ -6,7 +6,8 @@
}: }:
{ {
config = lib.mkIf config.myConfig.shell.enable { config = lib.mkIf config.myConfig.shell.enable {
programs.zsh.plugins = [ programs.zsh = {
plugins = [
{ {
name = "powerlevel10k"; name = "powerlevel10k";
src = pkgs.zsh-powerlevel10k; src = pkgs.zsh-powerlevel10k;
@ -18,5 +19,16 @@
file = "p10k.zsh"; file = "p10k.zsh";
} }
]; ];
initExtraFirst = ''
(( ''${+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)"
'';
};
}; };
} }