anchor.diff:      };
     };
   
  -  config = mkMerge [
  -    (let
  -      aliasesStr = concatStringsSep "\n" (
  -        mapAttrsToList (k: v: "alias ${k}='${v}'") cfg.shellAliases
  -      );
  -
  -      export = n: v: "export ${n}=\"${toString v}\"";
  -
  -      envVarsStr = concatStringsSep "\n" (
  -        mapAttrsToList export config.home.sessionVariables
  -      );
  -
  -      zdotdir = if cfg.dotDir == null then null else "$HOME/" + cfg.dotDir;
  -    in mkIf cfg.enable {
  +  config = mkIf cfg.enable (mkMerge [
  +    {
         home.packages = with pkgs; [ zsh ]
           ++ optional cfg.enableCompletion nix-zsh-completions
           ++ optional cfg.oh-my-zsh.enable oh-my-zsh;
   
  -      home.sessionVariables.${if cfg.dotDir != null then "ZDOTDIR" else null} = zdotdir;
  -
  -      home.file.".zshenv".text = ''
  -        ${optionalString (config.home.sessionVariableSetter == "zsh")
  -          envVarsStr}
  -        ${optionalString (cfg.dotDir != null && config.home.sessionVariableSetter != "zsh")
  -          (export "ZDOTDIR" zdotdir)}
  -      '';
   
         home.file."${relToDotDir ".zshrc"}".text = ''
           ${export "HISTSIZE" cfg.history.size}
  
positive.code:         source = plugin.src;
        }) cfg.plugins;
      })
    ];
  }
  
negative.code:   pluginsDir = if cfg.dotDir != null then
      relToDotDir "plugins" else ".zsh/plugins";
  
    export = n: v: "export ${n}=\"${toString v}\"";
  
    toEnvVarsStr = vars: concatStringsSep "\n" (
      mapAttrsToList export vars
    );
  
    envVarsStr = toEnvVarsStr config.home.sessionVariables;
  
    aliasesStr = concatStringsSep "\n" (
      mapAttrsToList (k: v: "alias ${k}='${v}'") cfg.shellAliases
    );
  
    zdotdir = "$HOME/" + cfg.dotDir;
  
    historyModule = types.submodule {
      options = {
  