mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
services/xmpp: Moved to PostgreSQL
This commit is contained in:
parent
e13de7054c
commit
386fe7a2c0
1 changed files with 23 additions and 1 deletions
|
|
@ -1,15 +1,37 @@
|
|||
{ config, lib, ... }:
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
katnet.public.tcp.ports = [ 5000 5222 5223 5269 580 5281 5347 5582 ];
|
||||
|
||||
services.postgresql = {
|
||||
ensureDatabases = [ "prosody" ];
|
||||
ensureUsers = [{
|
||||
name = "prosody";
|
||||
ensurePermissions."DATABASE prosody" = "ALL PRIVILEGES";
|
||||
}];
|
||||
};
|
||||
|
||||
|
||||
services.prosody = {
|
||||
enable = true;
|
||||
ssl.cert = "/var/lib/acme/prosody/fullchain.pem";
|
||||
ssl.key = "/var/lib/acme/prosody/key.pem";
|
||||
admins = [ "kat@kittywit.ch" ];
|
||||
package = let
|
||||
package = pkgs.prosody.override (old: {
|
||||
withExtraLibs = old.withExtraLibs ++ singleton pkgs.luaPackages.luadbi-postgresql;
|
||||
}); in package;
|
||||
extraConfig = ''
|
||||
legacy_ssl_ports = { 5223 }
|
||||
storage = "sql"
|
||||
sql = {
|
||||
driver = "PostgreSQL";
|
||||
host = "";
|
||||
database = "prosody";
|
||||
username = "prosody";
|
||||
}
|
||||
'';
|
||||
virtualHosts = {
|
||||
"xmpp.kittywit.ch" = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue