Last active
May 30, 2023 01:54
-
-
Save chris-martin/a263e617adaf6580042cacfe9a56e424 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs, config, ... }: | |
{ | |
/* XMPP */ | |
services.prosody = { | |
enable = true; | |
xmppComplianceSuite = false; | |
virtualHosts."internal" = { | |
enabled = true; | |
domain = "xmpp.typeclasses.com"; | |
ssl.cert = "/var/lib/acme/xmpp.typeclasses.com/fullchain.pem"; | |
ssl.key = "/var/lib/acme/xmpp.typeclasses.com/key.pem"; | |
}; | |
}; | |
networking.firewall.allowedTCPPorts = [ 5222 ]; | |
environment.systemPackages = [ pkgs.prosody ]; | |
/* Crypto */ | |
services.nginx.virtualHosts."xmpp.typeclasses.com" = { | |
forceSSL = true; | |
enableACME = true; | |
locations."/".proxyPass = "http://localhost:5280"; | |
}; | |
security.acme.certs."xmpp.typeclasses.com" = { | |
reloadServices = [ "prosody.service" ]; | |
group = config.services.prosody.group; | |
}; | |
users.users.nginx.extraGroups = [ config.services.prosody.group ]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment