services: matrix add mautrix-signal and mautrix-whatsapp config fix

This commit is contained in:
Kabbone 2022-12-30 09:59:11 +01:00
parent 9ac1f0f2bd
commit 4b77119927
Signed by: Kabbone
SSH Key Fingerprint: SHA256:A5zPB5I6u5V78V51c362BBdCwhDhfDUVbt7NfKdjWBY
4 changed files with 28 additions and 2 deletions

View File

@ -17,9 +17,11 @@ let
return 200 '${builtins.toJSON data}';
'';
in {
environment.systemPackages = {
environment.systemPackages = [
pkgs.mautrix-whatsapp
};
pkgs.signald
pkgs.mautrix-signal
];
services.nginx = {
enable = true;
@ -100,6 +102,17 @@ in {
Group = "mautrix-whatsapp";
};
};
mautrix-signal = {
description = "Matrix <-> Signal bridge";
wantedBy = [ "multi-user.target" ];
after = [ "network.target" "postgresql.service" "matrix-synapse.service" ];
requires = [ "postgresql.service" "matrix-synapse.service" "signald"];
script = "${pkgs.mautrix-signal}/bin/mautrix-signal --config ${config.age.secrets."services/matrix/mautrix-signal.yml".path}";
serviceConfig = {
User = "mautrix-signal";
Group = "mautrix-signal";
};
};
};
users = {
@ -176,6 +189,9 @@ in {
};
};
};
signald = {
enable = true;
};
};
age.secrets."services/matrix/synapse.yml" = {
@ -190,6 +206,10 @@ in {
file = ../../../secrets/services/matrix/mautrix-whatsapp.age;
owner = "mautrix-whatsapp";
};
age.secrets."services/matrix/mautrix-signal.yml" = {
file = ../../../secrets/services/matrix/mautrix-signal.age;
owner = "mautrix-signal";
};
age.secrets."services/matrix/telegram-registration.yml" = {
file = ../../../secrets/services/matrix/telegram-registration.age;
owner = "matrix-synapse";
@ -198,5 +218,9 @@ in {
file = ../../../secrets/services/matrix/whatsapp-registration.age;
owner = "matrix-synapse";
};
age.secrets."services/matrix/signal-registration.yml" = {
file = ../../../secrets/services/matrix/signal-registration.age;
owner = "matrix-synapse";
};
}

View File

@ -38,6 +38,8 @@ in
"services/matrix/telegram-registration.age".publicKeys = servers ++ users;
"services/matrix/mautrix-whatsapp.age".publicKeys = servers ++ users;
"services/matrix/whatsapp-registration.age".publicKeys = servers ++ users;
"services/matrix/mautrix-signal.age".publicKeys = servers ++ users;
"services/matrix/signal-registration.age".publicKeys = servers ++ users;
"services/nextcloud/adminpassFile.age".publicKeys = servers ++ users;
"services/nextcloud/dbpassFile.age".publicKeys = servers ++ users;
}

Binary file not shown.