From 2e35554e9f6e4d6cab281987c04af2142420c7b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 31 Oct 2023 17:00:35 +0100 Subject: [PATCH] add prosody --- clanModules/flake-module.nix | 1 + clanModules/prosody.nix | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 clanModules/prosody.nix diff --git a/clanModules/flake-module.nix b/clanModules/flake-module.nix index d273f1a09..896b4296d 100644 --- a/clanModules/flake-module.nix +++ b/clanModules/flake-module.nix @@ -9,6 +9,7 @@ }) (builtins.readDir ./diskLayouts); ejabberd = ./ejabberd.nix; + prosody = ./prosody.nix; dino = ./dino.nix; xfce = ./xfce.nix; }; diff --git a/clanModules/prosody.nix b/clanModules/prosody.nix new file mode 100644 index 000000000..d4fc5e374 --- /dev/null +++ b/clanModules/prosody.nix @@ -0,0 +1,30 @@ +{ config +, ... +}: { + services.prosody = { + enable = true; + modules.bosh = true; + extraModules = [ "private" "vcard" "privacy" "compression" "component" "muc" "pep" "adhoc" "lastactivity" "admin_adhoc" "blocklist" ]; + virtualHosts = { + "${config.clanCore.machineName}.local" = { + domain = "${config.clanCore.machineName}.local"; + enabled = true; + }; + }; + extraConfig = '' + allow_unencrypted_plain_auth = true + ''; + c2sRequireEncryption = false; + s2sRequireEncryption = false; + muc = [{ + domain = "muc.${config.clanCore.machineName}.local"; + maxHistoryMessages = 10000; + name = "${config.clanCore.machineName} Prosody"; + }]; + uploadHttp = { + domain = "upload.${config.clanCore.machineName}.local"; + }; + }; + # xmpp-server + networking.firewall.allowedTCPPorts = [ 5269 ]; +}