services: matrix add mautrix-whatsapp
This commit is contained in:
parent
7f7e66b68c
commit
e7b1a0289c
@ -15,7 +15,7 @@
|
|||||||
{
|
{
|
||||||
imports = # Import window or display manager.
|
imports = # Import window or display manager.
|
||||||
[
|
[
|
||||||
#../modules/editors/nvim # ! Comment this out on first install !
|
../modules/editors/nvim # ! Comment this out on first install !
|
||||||
];
|
];
|
||||||
|
|
||||||
users.users.${user} = { # System User
|
users.users.${user} = { # System User
|
||||||
@ -86,6 +86,7 @@
|
|||||||
bind
|
bind
|
||||||
dig
|
dig
|
||||||
agenix.defaultPackage.x86_64-linux
|
agenix.defaultPackage.x86_64-linux
|
||||||
|
ffmpeg
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -17,6 +17,10 @@ let
|
|||||||
return 200 '${builtins.toJSON data}';
|
return 200 '${builtins.toJSON data}';
|
||||||
'';
|
'';
|
||||||
in {
|
in {
|
||||||
|
environment.systemPackages = {
|
||||||
|
pkgs.mautrix-whatsapp
|
||||||
|
};
|
||||||
|
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
enable = true;
|
enable = true;
|
||||||
recommendedTlsSettings = true;
|
recommendedTlsSettings = true;
|
||||||
@ -81,19 +85,21 @@ in {
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
age.secrets."services/matrix/synapse.yml" = {
|
|
||||||
file = ../../../secrets/services/matrix/synapse.age;
|
|
||||||
owner = "matrix-synapse";
|
|
||||||
};
|
|
||||||
age.secrets."services/matrix/telegram-registration.yml" = {
|
|
||||||
file = ../../../secrets/services/matrix/telegram-registration.age;
|
|
||||||
owner = "matrix-synapse";
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.services = {
|
systemd.services = {
|
||||||
matrix-synapse = {
|
matrix-synapse = {
|
||||||
requires = [ "postgresql.service" ];
|
requires = [ "postgresql.service" ];
|
||||||
};
|
};
|
||||||
|
mautrix-whatsapp = {
|
||||||
|
description = "Matrix <-> WhatsApp bridge";
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
after = [ "network.target" "postgresql.service" "matrix-synapse.service" ];
|
||||||
|
requires = [ "postgresql.service" "matrix-synapse.service" ];
|
||||||
|
script = "${pkgs.mautrix-whatsapp}/bin/mautrix-whatsapp --config ${config.age.secrets."services/matrix/mautrix-whatsapp.yml".path}";
|
||||||
|
serviceConfig = {
|
||||||
|
User = "mautrix-whatsapp";
|
||||||
|
Group = "mautrix-whatsapp";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
users = {
|
users = {
|
||||||
@ -172,9 +178,25 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
age.secrets."services/matrix/synapse.yml" = {
|
||||||
|
file = ../../../secrets/services/matrix/synapse.age;
|
||||||
|
owner = "matrix-synapse";
|
||||||
|
};
|
||||||
age.secrets."services/matrix/mautrix-telegram.env" = {
|
age.secrets."services/matrix/mautrix-telegram.env" = {
|
||||||
file = ../../../secrets/services/matrix/mautrix-telegram.age;
|
file = ../../../secrets/services/matrix/mautrix-telegram.age;
|
||||||
owner = "mautrix-telegram";
|
owner = "mautrix-telegram";
|
||||||
};
|
};
|
||||||
|
age.secrets."services/matrix/mautrix-whatsapp.yml" = {
|
||||||
|
file = ../../../secrets/services/matrix/mautrix-whatsapp.age;
|
||||||
|
owner = "mautrix-whatsapp";
|
||||||
|
};
|
||||||
|
age.secrets."services/matrix/telegram-registration.yml" = {
|
||||||
|
file = ../../../secrets/services/matrix/telegram-registration.age;
|
||||||
|
owner = "matrix-synapse";
|
||||||
|
};
|
||||||
|
age.secrets."services/matrix/whatsapp-registration.yml" = {
|
||||||
|
file = ../../../secrets/services/matrix/whatsapp-registration.age;
|
||||||
|
owner = "matrix-synapse";
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user