{ userName, pkgs, customUtils, lib, config, ... }: let dotDir = ".config/zsh"; p10kZsh = "${dotDir}/.p10k.zsh"; cfg = config.home-manager.users.${userName}; in { home-manager.users.${userName} = { programs.zsh = { inherit dotDir; enable = true; autocd = true; enableCompletion = true; plugins = [ { name = "powerlevel10k"; file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme"; src = pkgs.zsh-powerlevel10k; } ]; initExtraFirst = '' if [[ $TERM == "dumb" ]]; then unsetopt zle PS1='$ ' return fi ''; initExtraBeforeCompInit = '' source "${cfg.home.homeDirectory}/${p10kZsh}" ''; initExtra = lib.mkAfter '' source ${./zshrc} source "${pkgs.zsh-syntax-highlighting}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" ''; }; home.file.${p10kZsh}.source = ./p10k.zsh; }; }