{ config, pkgs, lib, user, ... }: let zshConfigDir = "${config.xdg.configHome}/zsh"; # Define outside programs.zsh in { home-manager.users.${user.username} = { programs.zsh = { enable = true; enableCompletion = true; dotDir = zshConfigDir; # Use the variable here autosuggestion.enable = true; syntaxHighlighting.enable = true; oh-my-zsh = { enable = true; theme = ""; plugins = [ "git" "sudo" "extract" "colored-man-lpages" "command-not-found" "history" "docker" "kubectl" ]; }; }; # Set Zsh options (e.g., AUTO_CD) in .zshrc xdg.configFile."zsh/.zshrc".text = lib.concatStringsSep "\n" [ "setopt AUTO_CD" "setopt CORRECT" "setopt INTERACTIVE_COMMENTS" ]; }; }