anchor.diff:  
   let
     cfg = config.services.matrix-synapse;
  +  pg = config.services.postgresql;
  +  usePostgresql = cfg.database_type == "psycopg2";
     logConfigFile = pkgs.writeText "log_config.yaml" cfg.logConfig;
     mkResource = r: ''{names: ${builtins.toJSON r.names}, compress: ${boolToString r.compress}}'';
     mkListener = l: ''{port: ${toString l.port}, bind_address: "${l.bind_address}", type: ${l.type}, tls: ${boolToString l.tls}, x_forwarded: ${boolToString l.x_forwarded}, resources: [${concatStringsSep "," (map mkResource l.resources)}]}'';
  
positive.code:       tls_dh_params_path = mkOption {
          type = types.nullOr types.str;
          default = null;
          example = "/var/lib/matrix-synapse/homeserver.tls.dh";
          description = ''
            PEM dh parameters for ephemeral keys
          '';
  
negative.code:   name: "${cfg.database_type}",
    args: {
      ${concatStringsSep ",\n    " (
        mapAttrsToList (n: v: "\"${n}\": ${builtins.toJSON v}") cfg.database_args
      )}
    }
  }
  