nixos/hosts/architect/prosody.nix

55 lines
1.2 KiB
Nix
Raw Normal View History

2022-02-15 10:58:08 +00:00
{ lib, config, ... }:
let
domain = "xmpp.giugl.io";
conference_domain = "conference.${domain}";
upload_domain = "uploads.${domain}";
network = import ./network.nix;
2023-02-11 02:29:48 +00:00
in
{
architect.firewall = {
openTCP = [ 5222 5269 ];
};
2022-02-15 10:58:08 +00:00
services = {
prosody = {
enable = true;
virtualHosts.${domain} = {
inherit domain;
enabled = true;
ssl.key = "${config.security.acme.certs.${domain}.directory}/key.pem";
ssl.cert =
"${config.security.acme.certs.${domain}.directory}/fullchain.pem";
2022-02-15 10:58:08 +00:00
};
muc = [{ domain = conference_domain; }];
uploadHttp = { domain = upload_domain; };
admins = [ "giulio@${domain}" ];
2022-03-15 15:58:04 +00:00
#httpInterfaces = [ "wg0" ];
#httpsInterfaces = [ "wg0" ];
2022-02-15 10:58:08 +00:00
};
nginx.virtualHosts = {
"${domain}" = {
enableACME = true;
forceSSL = true;
};
# "${conference_domain}".enableACME = true;
# "${upload_domain}".enableACME = true;
};
};
2022-02-15 10:58:08 +00:00
networking.extraHosts = ''
${network.architect-lan} ${domain}
${network.architect-wg} ${domain}
${network.architect-ts} ${domain}
2022-10-11 20:30:49 +01:00
'';
2022-02-15 10:58:08 +00:00
2022-10-11 20:30:49 +01:00
users.groups = {
acme.members = [ "prosody" ];
nginx.members = [ "prosody" ];
};
2022-02-15 10:58:08 +00:00
}