server_name: "{{ matrix.domain }}"
pid_file: /tmp/homeserver.pid
public_baseurl: "{{ matrix.public_url }}/"
use_presence: false
allow_public_rooms_without_auth: false
allow_public_rooms_over_federation: true
forget_rooms_on_leave: true
macaroon_secret_key: "{{ matrix_macaroon_secret_key }}"
registration_shared_secret: "{{ matrix_registration_shared_secret }}"
form_secret: "{{ matrix_form_secret}}"

listeners:
  - port: 8448
    tls: false
    type: http
    x_forwarded: true
    resources:
      - names: [client, federation]

  - port: 8008
    tls: false
    type: http
    x_forwarded: true
    resources:
      - names: [client, federation]
        compress: false

admin_contact: 'mailto:verwaltung@warpzone.ms'

retention:
  enabled: true


database:
  name: "psycopg2"
  args:
    user: synapse
    password: "{{ postgres_user_pass }}"
    database: synapse
    host: db
    cp_min: 5
    cp_max: 10

log_config: "/data/homeserver.log.config"

media_store_path: "/data/media_store"
max_upload_size: 10M
dynamic_thumbnails: false
thumbnail_sizes:
  - width: 32
    height: 32
    method: crop
  - width: 96
    height: 96
    method: crop
  - width: 320
    height: 240
    method: scale
  - width: 640
    height: 480
    method: scale
  - width: 800
    height: 600
    method: scale

url_preview_enabled: true
url_preview_ip_range_blacklist:
  - '127.0.0.0/8'
  - '10.0.0.0/8'
  - '172.16.0.0/12'
  - '192.168.0.0/16'
  - '100.64.0.0/10'
  - '192.0.0.0/24'
  - '169.254.0.0/16'
  - '198.18.0.0/15'
  - '192.0.2.0/24'
  - '198.51.100.0/24'
  - '203.0.113.0/24'
  - '224.0.0.0/4'
  - '::1/128'
  - 'fe80::/10'
  - 'fc00::/7'

max_spider_size: 10M

enable_registration: false

password_config:
  enabled: false

oidc_providers:
  - idp_id: "uffd"
    idp_name: "warpzone SSO (uffd)"
    discover: true
    enable_registration: true
    allow_existing_users: true
    user_profile_method: "userinfo_endpoint"
    issuer: "{{ oidc_global.provider_url }}"
    client_id: "matrix" 
    client_secret: "{{ matrix_oidc_secret }}" 
    scopes: 
      - "openid"
      - "profile"
      - "email"
    user_mapping_provider:
      config:
        localpart_template: "{% raw %}{{ user.preferred_username }}{% endraw %}"
        display_name_template: "{% raw %}{{ user.name }}{% endraw %}"
        email_template: "{% raw %}{{ user.email }}{% endraw %}"


auto_join_rooms:
  - "#warpzone:{{ matrix.domain }}"

report_stats: false

signing_key_path: "/data/homeserver.signing.key"
key_refresh_interval: 1d
suppress_key_server_warning: true
trusted_key_servers:
  - server_name: "matrix.org"

email:
  smtp_host: {{ smtp_host }}
  smtp_port: {{ smtp_port }}
  smtp_user: "{{ noreply_email_user }}"
  smtp_pass: "{{ noreply_email_pass }}"
  require_transport_security: false
  notif_from: "Warpzone Matrix <matrix@{{ smtp_domain }}>"
  enable_notifs: true
  notif_for_new_users: False

encryption_enabled_by_default_for_room_type: invite
enable_group_creation: false

user_directory:
  enabled: true
  search_all_users: false


  # new in 1.34 spaces
  experimental_features: { spaces_enabled: true }
