From 69b1e740b4bcae179f7021d1b24c8a835af9c863 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 12 Jul 2020 18:59:58 +0200 Subject: ... --- ymir.nix | 48 +++++++++++++++++++++--------------------------- 1 file changed, 21 insertions(+), 27 deletions(-) diff --git a/ymir.nix b/ymir.nix index 6bab76bf..9c01b067 100644 --- a/ymir.nix +++ b/ymir.nix @@ -20,7 +20,7 @@ let }; myDomains = [ "dirty-haskell.org" "www.dirty-haskell.org" "lists.dirty-haskell.org" "l.dirty-haskell.org" "online.141.li" "o.141.li" "ftp.141.li" "files.141.li" "f.141.li" "ymir.141.li" "141.li" "www.141.li" "lists.141.li" "l.141.li" "rpg.141.li" "odin.141.li" - "ymir.xmpp.li" "xmpp.li" "www.xmpp.li" "lists.xmpp.li" "l.xmpp.li" "muc.xmpp.li" "proxy.xmpp.li" "upload.xmpp.li" + "ymir.xmpp.li" "xmpp.li" "www.xmpp.li" "lists.xmpp.li" "l.xmpp.li" "muc.xmpp.li" "proxy.xmpp.li" "online.yggdrasil.li" "o.yggdrasil.li" "ftp.yggdrasil.li" "files.yggdrasil.li" "f.yggdrasil.li" "ymir.yggdrasil.li" "git.yggdrasil.li" "www.yggdrasil.li" "yggdrasil.li" "lists.yggdrasil.li" "l.yggdrasil.li" "rpg.yggdrasil.li" "odin.yggdrasil.li" "online.praseodym.org" "o.praseodym.org" "ftp.praseodym.org" "files.praseodym.org" "f.praseodym.org" "ymir.praseodym.org" "praseodym.org" "www.praseodym.org" "lists.praseodym.org" "l.praseodym.org" "rpg.praseodym.org" "git.rheperire.org" "api.rheperire.org" "www.rheperire.org" "rheperire.org" @@ -68,13 +68,13 @@ in rec { nixpkgs.overlays = [ (self: super: { - # prosody = self.callPackage ./customized/prosody.nix ({ - # inherit (self.lua51Packages) luasocket luaexpat luafilesystem luabitop luaevent luasec luadbi; - # lua5 = pkgs.lua5_1; - # withCommunityModules = ["carbons" "reload_modules" "csi" "cloud_notify" "csi_pump" "smacks" "track_muc_joins" "watchuntrusted" "auth_pam"]; - # extraModules = [prosodyAuth]; - # extraLibs = [luaPam luaPosix luaSha2] ++ (with self.lua51Packages; [lua-zlib]); - # }); + prosody = self.callPackage ./customized/prosody.nix ({ + inherit (self.lua51Packages) luasocket luaexpat luafilesystem luabitop luaevent luasec luadbi; + lua5 = pkgs.lua5_1; + withCommunityModules = ["carbons" "reload_modules" "csi" "cloud_notify" "csi_pump" "smacks" "track_muc_joins" "watchuntrusted"]; + extraModules = [prosodyAuth]; + extraLibs = [luaPam luaPosix luaSha2] ++ (with self.lua51Packages; [lua-zlib]); + }); # uwsgi = pkgs.callPackage ./customized/uwsgi.nix { # extraPlugins = { # cgi = { @@ -259,10 +259,6 @@ in rec { }; services.prosody = { - package = pkgs.prosody.override { - withExtraLibs = with pkgs.lua52Packages; [ luaPam luaPosix luafilesystem ]; - withCommunityModules = [ "auth_pam" ]; - }; enable = true; admins = [ "gkleen@xmpp.li" @@ -273,7 +269,7 @@ in rec { allowRegistration = false; extraModules = [ "posix" "private" - "auth_pam" + "auth_custom" "carbons" "reload_modules" "smacks" @@ -287,7 +283,17 @@ in rec { ]; extraConfig = '' reload_modules = { "group", "tls" } - authentication="pam" + authentication="custom" + custom_alias_file="/etc/prosody/aliases" + custom_alias_secret_file="/etc/prosody/alias_secret" + + Component "alias.xmpp.li" + Include "/etc/prosody/alias.xmpp.li.cfg.lua" + + Component "muc.xmpp.li" "muc" + restrict_room_creation = true + max_history_messages = 100 + name = "Multi-user chats" Component "proxy.xmpp.li" "proxy65" proxy65_acl = {"xmpp.li", "yggdrasil.li", "praseodym.org", "141.li", "nights.email"}; @@ -296,19 +302,7 @@ in rec { virtualHosts = builtins.listToAttrs (map (name: { inherit name; value = prosodyVirtHost name; }) ["xmpp.li" "yggdrasil.li" "praseodym.org" "141.li" "nights.email"]); - uploadHttp = { - domain = "upload.xmpp.li"; - uploadFileSizeLimit = "${toString (1024 * 1024 * 1024)}"; - userQuota = 1024 * 1024 * 1024; - }; - - muc = [ - { domain = "muc.xmpp.li"; - name = "Multi-User Chats"; - restrictRoomCreation = true; - maxHistoryMessages = 250; - } - ]; + xmppComplianceSuite = false; }; security.pam.services."xmpp".text = '' auth requisite pam_succeed_if.so user ingroup xmpp -- cgit v1.2.3