hosts/vps1: update mautrix configs
All checks were successful
Check flake / build-amd64-linux (push) Successful in 1m37s
All checks were successful
Check flake / build-amd64-linux (push) Successful in 1m37s
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
{
|
||||
inputs,
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
@@ -26,26 +27,26 @@ let
|
||||
};
|
||||
matrixServerConfig."m.server" = "${matrixSubdomain}:443";
|
||||
commonBridgeSettings = bridge: {
|
||||
appservice = {
|
||||
database = lib.mkIf usePostgresql {
|
||||
type = "postgres";
|
||||
uri = "postgresql:///${bridge}?host=/run/postgresql";
|
||||
};
|
||||
};
|
||||
bridge = {
|
||||
encryption = {
|
||||
allow = true;
|
||||
default = true;
|
||||
require = true;
|
||||
};
|
||||
permissions = {
|
||||
"${serverName}" = "user";
|
||||
"@jordan:${serverName}" = "admin";
|
||||
};
|
||||
};
|
||||
encryption = {
|
||||
allow = true;
|
||||
default = true;
|
||||
require = true;
|
||||
pickle_key =
|
||||
if (bridge == "mautrix-whatsapp") then "maunium.net/go/mautrix-whatsapp" else "mautrix.bridge.e2ee";
|
||||
};
|
||||
provisioning = {
|
||||
shared_secret = "disable";
|
||||
};
|
||||
};
|
||||
homeserver = {
|
||||
address = "https://${matrixSubdomain}";
|
||||
domain = serverName;
|
||||
@@ -61,6 +62,15 @@ let
|
||||
'';
|
||||
in
|
||||
{
|
||||
# Backport new options from https://github.com/NixOS/nixpkgs/pull/446155
|
||||
disabledModules = [
|
||||
"services/matrix/mautrix-whatsapp.nix"
|
||||
];
|
||||
|
||||
imports = [
|
||||
(inputs.nixpkgs-unstable + /nixos/modules/services/matrix/mautrix-whatsapp.nix)
|
||||
];
|
||||
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
8448 # Matrix federation
|
||||
];
|
||||
@@ -208,18 +218,19 @@ in
|
||||
|
||||
services.mautrix-whatsapp = lib.mkIf bridges.whatsapp {
|
||||
enable = true;
|
||||
settings = {
|
||||
bridge = {
|
||||
settings = lib.recursiveUpdate {
|
||||
backfill = {
|
||||
enabled = true;
|
||||
max_initial_messags = 50;
|
||||
};
|
||||
network = {
|
||||
mute_status_broadcast = true;
|
||||
history_sync = {
|
||||
backfill = true;
|
||||
max_initial_conversations = -1;
|
||||
message_count = 50;
|
||||
request_full_sync = true;
|
||||
};
|
||||
mute_bridging = true;
|
||||
};
|
||||
}
|
||||
// commonBridgeSettings "mautrix-whatsapp";
|
||||
} (commonBridgeSettings "mautrix-whatsapp");
|
||||
};
|
||||
|
||||
environment.persistence."/persist".directories = [
|
||||
|
Reference in New Issue
Block a user