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,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
@@ -26,25 +27,25 @@ let
|
|||||||
};
|
};
|
||||||
matrixServerConfig."m.server" = "${matrixSubdomain}:443";
|
matrixServerConfig."m.server" = "${matrixSubdomain}:443";
|
||||||
commonBridgeSettings = bridge: {
|
commonBridgeSettings = bridge: {
|
||||||
appservice = {
|
database = lib.mkIf usePostgresql {
|
||||||
database = lib.mkIf usePostgresql {
|
type = "postgres";
|
||||||
type = "postgres";
|
uri = "postgresql:///${bridge}?host=/run/postgresql";
|
||||||
uri = "postgresql:///${bridge}?host=/run/postgresql";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
bridge = {
|
bridge = {
|
||||||
encryption = {
|
|
||||||
allow = true;
|
|
||||||
default = true;
|
|
||||||
require = true;
|
|
||||||
};
|
|
||||||
permissions = {
|
permissions = {
|
||||||
"${serverName}" = "user";
|
"${serverName}" = "user";
|
||||||
"@jordan:${serverName}" = "admin";
|
"@jordan:${serverName}" = "admin";
|
||||||
};
|
};
|
||||||
provisioning = {
|
};
|
||||||
shared_secret = "disable";
|
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 = {
|
homeserver = {
|
||||||
address = "https://${matrixSubdomain}";
|
address = "https://${matrixSubdomain}";
|
||||||
@@ -61,6 +62,15 @@ let
|
|||||||
'';
|
'';
|
||||||
in
|
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 = [
|
networking.firewall.allowedTCPPorts = [
|
||||||
8448 # Matrix federation
|
8448 # Matrix federation
|
||||||
];
|
];
|
||||||
@@ -208,18 +218,19 @@ in
|
|||||||
|
|
||||||
services.mautrix-whatsapp = lib.mkIf bridges.whatsapp {
|
services.mautrix-whatsapp = lib.mkIf bridges.whatsapp {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = lib.recursiveUpdate {
|
||||||
bridge = {
|
backfill = {
|
||||||
|
enabled = true;
|
||||||
|
max_initial_messags = 50;
|
||||||
|
};
|
||||||
|
network = {
|
||||||
|
mute_status_broadcast = true;
|
||||||
history_sync = {
|
history_sync = {
|
||||||
backfill = true;
|
|
||||||
max_initial_conversations = -1;
|
max_initial_conversations = -1;
|
||||||
message_count = 50;
|
|
||||||
request_full_sync = true;
|
request_full_sync = true;
|
||||||
};
|
};
|
||||||
mute_bridging = true;
|
|
||||||
};
|
};
|
||||||
}
|
} (commonBridgeSettings "mautrix-whatsapp");
|
||||||
// commonBridgeSettings "mautrix-whatsapp";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.persistence."/persist".directories = [
|
environment.persistence."/persist".directories = [
|
||||||
|
Reference in New Issue
Block a user