anchor.diff:          ''}
   
           ${concatStrings (map (plugin: ''
  -          source "$HOME/.zsh/plugins/${plugin.name}/${plugin.file}"
  +          source "$HOME/${pluginsDir}/${plugin.name}/${plugin.file}"
           '') cfg.plugins)}
   
           ${cfg.initExtra}
  
positive.code:       programs.zsh.enableCompletion = mkDefault true;
  
        home.file = map (plugin: {
          target = ".zsh/plugins/${plugin.name}";
          source = plugin.src;
        }) cfg.plugins;
      })
  
negative.code:       envVarsStr = concatStringsSep "\n" (
          mapAttrsToList export config.home.sessionVariables
        );
  
        zdotdir = if cfg.dotDir == null then null else "$HOME/" + cfg.dotDir;
      in mkIf cfg.enable {
        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}
          ${export "HISTFILE" ("$HOME/" + cfg.history.path)}
  
          setopt HIST_FCNTL_LOCK
          ${if cfg.history.ignoreDups then "setopt" else "unsetopt"} HIST_IGNORE_DUPS
  