anchor.diff:          The data directory, for storing certificates. Before 17.09, this
           would create a .caddy directory. With 17.09 the contents of the
           .caddy directory are in the specified data directory instead.
  +
  +        Caddy v2 replaced CADDYPATH with XDG directories.
  +        See https://caddyserver.com/docs/conventions#file-locations.
         '';
       };
   
       package = mkOption {
  -      default = pkgs.caddy;
  -      defaultText = "pkgs.caddy";
  -      example = "pkgs.caddy2";
  +      default = pkgs.caddy2;
  +      defaultText = "pkgs.caddy2";
  +      example = "pkgs.caddy";
         type = types.package;
         description = ''
           Caddy package to use.
  -
  -        Note: to use Caddy v2, set this to <option>pkgs.caddy2</option>.
  -        v2 will become the default after it is released.
  +        To use Caddy v1 (obsolete), set this to <option>pkgs.caddy</option>.
         '';
       };
     };
  
positive.code:     ${cfg.package}/bin/caddy adapt \
        --config ${configFile} --adapter ${cfg.adapter} > $out
    '');
    configJSON = pkgs.writeText "caddy-config.json" (builtins.toJSON
      (recursiveUpdate adaptedConfig tlsConfig));
  in {
  
negative.code: 
      config = mkOption {
        default = "";
        example = ''
          example.com {
            encode gzip
            log
            root /srv/http
          }
        '';
        type = types.lines;
        description = ''
          Verbatim Caddyfile to use.
          Caddy v2 supports multiple config formats via adapters (see <option>services.caddy.adapter</option>).
        '';
      };
  
      adapter = mkOption {
  