anchor.diff:      };
     };
   
  -  config = mkIf config.manual.manpages.enable {
  -    home.packages = [ homeManagerManual.manpages ];
  +  config = {
  +    home.packages = mkMerge [
  +      (mkIf cfg.html.enable [ helpScript homeManagerManual.manual  ])
  +
  +      (mkIf cfg.manpages.enable [ homeManagerManual.manpages ])
  +    ];
     };
   
     # To fix error during manpage build.
  
positive.code: with lib;
  
  let
  
    /* For the purpose of generating docs, evaluate options with each derivation
      in `pkgs` (recursively) replaced by a fake with path "\${pkgs.attribute.path}".
  
negative.code:       in scrubbedEval.options;
    };
  
    manualHtmlRoot = "${homeManagerManual.manual}/share/doc/home-manager/index.html";
  
    helpScript = pkgs.writeScriptBin "home-manager-help" ''
      #!${pkgs.bash}/bin/bash -e
  
      if [ -z "$BROWSER" ]; then
        for candidate in xdg-open open w3m; do
          BROWSER="$(type -P $candidate || true)"
          if [ -x "$BROWSER" ]; then
            break;
          fi
        done
      fi
  
      if [ -z "$BROWSER" ]; then
        echo "$0: unable to start a web browser; please set \$BROWSER"
        exit 1
      fi
  
      exec "$BROWSER" ${manualHtmlRoot}
    '';
  
  in
  
  {
    options = {
      manual.html.enable = mkOption {
        type = types.bool;
        default = false;
        description = ''
          Whether to install the HTML manual. This also installs the
          <command>home-manager-help</command> tool, which opens a local
          copy of the Home Manager manual in the system web browser.
        '';
      };
  
      manual.manpages.enable = mkOption {
        type = types.bool;
        default = true;
  