{ config, pkgs, lib, user, ... }: let zshConfigDir = "${config.home-manager.users.${user.username}.xdg.configHome}/zsh"; in { home-manager.users.${user.username} = { programs.zsh = { enable = true; enableCompletion = true; dotDir = zshConfigDir; autosuggestion.enable = true; syntaxHighlighting.enable = true; oh-my-zsh = { enable = true; theme = ""; plugins = [ "git" "sudo" "extract" "colored-man-pages" "command-not-found" "history" "docker" "kubectl" ]; }; }; # Single, consolidated .zshrc xdg.configFile."zsh/.zshrc".text = lib.concatStringsSep "\n" [ "# Zsh options" "setopt AUTO_CD" "setopt CORRECT" "setopt INTERACTIVE_COMMENTS" "" "# Oh-My-Zsh" "export ZSH=\"${zshConfigDir}\"" "source \"${pkgs.zsh}/share/zsh/functions/Newuser/zsh-newuser-install\"" "source \"${zshConfigDir}/oh-my-zsh.sh\"" "" "# Starship (if used)" "eval \"$(starship init zsh)\"" ]; }; }