{ base, config, lib, pkgs, ... }:
lib.recursiveUpdate {
  services.matrix-synapse = {
    enable = true;
    withJemalloc = true;

    plugins = with config.services.matrix-synapse.package.plugins;
      [ matrix-synapse-mjolnir-antispam ];

    settings = rec {
      server_name = "clicks.codes";
      auto_join_rooms = [ "#general:${server_name}" ];
      enable_registration = true;
      registration_requires_token = true;
      allow_public_rooms_over_federation = true;
      allow_device_name_lookup_over_federation = true;
      registration_shared_secret = "!!registration_shared_secret!!";
      public_baseurl = "https://matrix-backend.clicks.codes/";
      max_upload_size = "100M";
      listeners = [{
        x_forwarded = true;
        tls = false;
        resources = [{
          names = [ "client" "federation" ];
          compress = true;
        }];
        port = 4527;
      }];
      enable_metrics = true;
      database.args.database = "synapse";

      oidc_providers = [
        {
          idp_id = "keycloak";
          idp_name = "Clicks Keycloak";
          issuer = "https://login.clicks.codes/realms/master";
          client_id = "matrix";
          client_secret = "!!matrix_keycloak_client_secret!!";
          scopes = [ "openid" "profile" ];
          user_mapping_provider = {
            config = {
              localpart_template = "{{ user.preferred_username }}";
              display_name_template = "{{ user.name }}";
            };
          };
          backchannel_logout_enabled = true;
        }
      ];

      turn_uris = [

        /* "turn:turn.clicks.codes:3478?transport=udp"
           "turn:turn.clicks.codes:3478?transport=tcp"
           "turns:turn.clicks.codes:5349?transport=udp"
           "turns:turn.clicks.codes:5349?transport=tcp"
        */
      ]; # Please use matrix.org turn
      # turn_shared_secret = "!!turn_shared_secret!!";

      log_config = lib.pipe {
        version = 1;
        formatters = {
          precise = {
            format =
              "%(asctime)s - %(name)s - %(lineno)d - %(levelname)s - %(request)s - %(message)s";
          };
        };
        handlers = {
          console = {
            class = "logging.StreamHandler";
            formatter = "precise";
          };
        };
        loggers = { "synapse.storage.SQL" = { level = "WARNING"; }; };
        root = {
          level = "ERROR";
          handlers = [ "console" ];
        };
        "disable_existing_loggers" = false;
      } [ builtins.toJSON (builtins.toFile "logcfg.yaml") ];
    };
  };

  networking.firewall.allowedTCPPorts = [ 3478 5349 ];
  networking.firewall.allowedUDPPorts = [ 3478 5349 ];

  services.mjolnir = {
    enable = false;

    settings = {
      autojoinOnlyIfManager = true;
      automaticallyRedactForReasons =
        [ "nsfw" "gore" "spam" "harassment" "hate" ];
      recordIgnoredInvites = true;
      admin.enableMakeRoomAdminCommand = true;
      allowNoPrefix = true;
      protections.wordlist.words = [ ];
      protectedRooms = [ "https://matrix.to/#/#global:clicks.codes" ];
    };

    pantalaimon = {
      enable = true;
      username = "system";
      passwordFile = config.sops.secrets.mjolnir_password.path;
      options = {
        ssl = false;
        listenAddress = "127.0.0.1";
      };
    };

    homeserverUrl = "http://localhost:4527";

    managementRoom = "#moderation-commands:clicks.codes";
  };

  services.coturn = {
    enable = false;

    use-auth-secret = true;
    # static-auth-secret-file = config.sops.secrets.turn_shared_secret.path;

    realm = "turn.clicks.codes";

    no-tcp-relay = true;

    no-cli = true;

    extraConfig = ''
      external-ip=turn.clicks.codes
    '';
  };

  sops.secrets = {
    #turn_shared_secret = {
    #  mode = "0440";
    #  owner = "turnserver";
    #  group = "matrix-synapse";
    #  sopsFile = ../../secrets/matrix.json;
    #  format = "json";
    #};
    matrix_keycloak_client_secret = {
      mode = "0400";
      owner = config.users.users.matrix-synapse.name;
      group = config.users.users.matrix-synapse.group;
      sopsFile = ../../secrets/matrix.json;
      format = "json";
    };
    registration_shared_secret = {
      mode = "0400";
      owner = config.users.users.root.name;
      group = config.users.users.root.group;
      sopsFile = ../../secrets/matrix.json;
      format = "json";
    };
    matrix_private_key = {
      mode = "0600";
      owner = config.users.users.matrix-synapse.name;
      group = config.users.users.matrix-synapse.group;
      sopsFile = ../../secrets/matrix_private_key.pem;
      format = "binary";
      path = config.services.matrix-synapse.settings.signing_key_path;
    };
    /*mjolnir_password = {
      mode = "0600";
      owner = config.users.users.mjolnir.name;
      group = config.users.users.mjolnir.group;
      sopsFile = ../../secrets/matrix.json;
      format = "json";
    };*/
  };
} (let isDerived = base != null;
in if isDerived
# We cannot use mkIf as both sides are evaluated no matter the condition value
# Given we use base as an attrset, mkIf will error if base is null in here
then
  let synapse_cfgfile = config.services.matrix-synapse.configFile;
  in {
    scalpel.trafos."synapse.yaml" = {
      source = toString synapse_cfgfile;
      matchers."registration_shared_secret".secret =
        config.sops.secrets.registration_shared_secret.path;
      matchers."matrix_keycloak_client_secret".secret =
        config.sops.secrets.matrix_keycloak_client_secret.path;
      # matchers."turn_shared_secret".secret =
      #   config.sops.secrets.turn_shared_secret.path;
      owner = config.users.users.matrix-synapse.name;
      group = config.users.users.matrix-synapse.group;
      mode = "0400";
    };

    systemd.services.matrix-synapse.serviceConfig.ExecStart = lib.mkForce
      (builtins.replaceStrings [ "${synapse_cfgfile}" ]
        [ "${config.scalpel.trafos."synapse.yaml".destination}" ]
        "${base.config.systemd.services.matrix-synapse.serviceConfig.ExecStart}");

    systemd.services.matrix-synapse.preStart = lib.mkForce
      (builtins.replaceStrings [ "${synapse_cfgfile}" ]
        [ "${config.scalpel.trafos."synapse.yaml".destination}" ]
        "${base.config.systemd.services.matrix-synapse.preStart}");

    systemd.services.matrix-synapse.restartTriggers = [ synapse_cfgfile ];

    environment.systemPackages = with lib;
      let
        cfg = config.services.matrix-synapse;
        registerNewMatrixUser = let
          isIpv6 = x: lib.length (lib.splitString ":" x) > 1;
          listener = lib.findFirst (listener:
            lib.any (resource: lib.any (name: name == "client") resource.names)
            listener.resources) (lib.last cfg.settings.listeners)
            cfg.settings.listeners;
          # FIXME: Handle cases with missing client listener properly,
          # don't rely on lib.last, this will not work.

          # add a tail, so that without any bind_addresses we still have a useable address
          bindAddress = head (listener.bind_addresses ++ [ "127.0.0.1" ]);
          listenerProtocol = if listener.tls then "https" else "http";
        in pkgs.writeShellScriptBin "matrix-synapse-register_new_matrix_user" ''
          exec ${cfg.package}/bin/register_new_matrix_user \
            $@ \
            ${
              lib.concatMapStringsSep " " (x: "-c ${x}")
              ([ config.scalpel.trafos."synapse.yaml".destination ]
                ++ cfg.extraConfigFiles)
            } \
            "${listenerProtocol}://${
              if (isIpv6 bindAddress) then
                "[${bindAddress}]"
              else
                "${bindAddress}"
            }:${builtins.toString listener.port}/"
        '';
      in [ (lib.meta.hiPrio registerNewMatrixUser) ];
  }
else
  { })
