Prosody: Difference between revisions

Tie-ling (talk | contribs)
m at -> on
Tie-ling (talk | contribs)
rm redundant config
 
Line 19: Line 19:
       description = "http upload";
       description = "http upload";
       url = "upload.xmpp.${domainName}";
       url = "upload.xmpp.${domainName}";
    }
    {
      description = "multi user chat";
      url = "muc.xmpp.${domainName}";
     }
     }
   ];
   ];
Line 101: Line 97:
       }
       }
     ];
     ];
    disco_items = [
  }
      {
        description = "multi user chat";
        url = "muc.xmpp.${domainName}";
      }
    ];
}
</syntaxhighlight>
</syntaxhighlight>


Line 121: Line 111:
       # xmpp server for "@example.org" is hosted on "xmpp.example.org"
       # xmpp server for "@example.org" is hosted on "xmpp.example.org"
       # use SRV records.
       # use SRV records.
       "xmpp.${domainName}" = {
       "myvhost0" = {
         domain = "${domainName}";
         domain = "${domainName}";
         enabled = true;
         enabled = true;
Line 200: Line 190:
== Connect to prosody ==
== Connect to prosody ==
<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
   services.prosody.virtualHosts."xmpp.${domainName}".extraConfig = ''
   services.prosody.virtualHosts."myvhost0".extraConfig = ''
     turn_external_host = "turn.xmpp.${domainName}"
     turn_external_host = "turn.xmpp.${domainName}"
     turn_external_secret = "unfortunately this is a inline password"
     turn_external_secret = "unfortunately this is a inline password"
Line 282: Line 272:
     http_upload_external_base_url = "https://upload.xmpp.${domainName}/upload/"
     http_upload_external_base_url = "https://upload.xmpp.${domainName}/upload/"
     http_upload_external_file_size_limit = 52428800
     http_upload_external_file_size_limit = 52428800
    -- Grant permissions for users on the '${domainName}' VirtualHost
    parent_host = "${domainName}"
   '';
   '';
   services.prosody.disco_items = [
   services.prosody.disco_items = [