{ config, lib, pkgs, ... }: { options.jalr.matrix = with lib; with lib.types; { enable = mkEnableOption "simple matrix server"; synapse = { port = mkOption { description = "TCP port for synapse service."; type = port; }; app_service_config = mkOption { type = attrsOf path; description = '' An attribute set of app_service_config_files ''; default = { }; example = { "my-service-alias" = "/path/to/appservice.yaml"; }; }; }; fqdn = mkOption { type = str; description = '' FQDN of the matrix server ''; example = "matrix.example.com"; }; domain = mkOption { type = str; description = '' Domain of the matrix server ''; example = "example.com"; }; turn = { host = mkOption { type = str; description = '' Hostname of TURN service ''; example = "turn.example.com"; }; sharedSecretFile = mkOption { type = path; description = "Location of the shared secret file for the TURN service"; }; }; mautrix-signal = { enable = mkEnableOption "signal bridge"; serviceDependencies = mkOption { type = with types; listOf str; default = optional config.services.matrix-synapse.enable config.services.matrix-synapse.serviceUnit; defaultText = literalExpression '' optional config.services.matrix-synapse.enable config.services.matrix-synapse.serviceUnit ''; description = '' List of Systemd services to require and wait for when starting the application service. ''; }; port = mkOption { description = "TCP port for mautrix-signal."; type = port; }; settings = mkOption { inherit ((pkgs.formats.json { })) type; }; }; mautrix-whatsapp = { enable = mkEnableOption "whatsapp bridge"; port = mkOption { description = "TCP port for mautrix-whatsapp."; type = port; }; settings = mkOption { inherit ((pkgs.formats.json { })) type; }; }; }; imports = [ ./mautrix-signal.nix ./mautrix-whatsapp.nix ./synapse.nix ]; }