diff --git a/modules/home/shell/default.nix b/modules/home/shell/default.nix index a54d8be..8ade8e7 100644 --- a/modules/home/shell/default.nix +++ b/modules/home/shell/default.nix @@ -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 = '' zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-Z}' zstyle ':completion:*' list-colors ''${(s.:.)LS_COLORS} diff --git a/modules/home/shell/p10k/default.nix b/modules/home/shell/p10k/default.nix index 1fd0cd2..5172452 100644 --- a/modules/home/shell/p10k/default.nix +++ b/modules/home/shell/p10k/default.nix @@ -6,17 +6,29 @@ }: { config = lib.mkIf config.myConfig.shell.enable { - programs.zsh.plugins = [ - { - name = "powerlevel10k"; - src = pkgs.zsh-powerlevel10k; - file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme"; - } - { - name = "powerlevel10k-config"; - src = ./.; - file = "p10k.zsh"; - } - ]; + programs.zsh = { + plugins = [ + { + name = "powerlevel10k"; + src = pkgs.zsh-powerlevel10k; + file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme"; + } + { + name = "powerlevel10k-config"; + src = ./.; + 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)" + ''; + }; }; }