2023-07-16 22:17:50 +00:00
|
|
|
{ config, ... }:
|
2023-03-18 23:54:53 +00:00
|
|
|
|
2022-11-27 18:51:19 +00:00
|
|
|
{
|
2023-03-18 23:54:53 +00:00
|
|
|
virtualisation.oci-containers.containers = {
|
2023-03-19 00:01:41 +00:00
|
|
|
# https://gitlab.com/signald/signald
|
2023-03-18 23:54:53 +00:00
|
|
|
signald = {
|
2023-03-19 00:01:41 +00:00
|
|
|
image = "registry.gitlab.com/signald/signald:0.23.2";
|
2023-03-18 23:54:53 +00:00
|
|
|
environmentFiles = [ config.age.secrets.signald-environment.path ];
|
|
|
|
volumes = [
|
2023-06-21 12:21:40 +00:00
|
|
|
"/var/lib/matrix-bridges/signald:/signald"
|
2023-03-18 23:54:53 +00:00
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2023-03-19 00:01:41 +00:00
|
|
|
# https://mau.dev/mautrix/signal
|
2023-03-18 23:54:53 +00:00
|
|
|
matrix-signal = {
|
2023-06-27 18:26:31 +00:00
|
|
|
image = "dock.mau.dev/mautrix/signal:v0.4.3";
|
2023-03-18 23:54:53 +00:00
|
|
|
dependsOn = [ "signald" ];
|
|
|
|
ports = [ "127.0.0.1:29328:29328" ];
|
|
|
|
volumes = [
|
2023-06-21 12:21:40 +00:00
|
|
|
"/var/lib/matrix-bridges/signal:/data"
|
|
|
|
"/var/lib/matrix-bridges/signald:/signald"
|
2023-03-18 23:54:53 +00:00
|
|
|
];
|
2022-11-27 18:51:19 +00:00
|
|
|
};
|
2023-03-18 23:54:53 +00:00
|
|
|
|
2023-03-19 00:01:41 +00:00
|
|
|
# https://mau.dev/mautrix/whatsapp
|
2023-03-18 23:54:53 +00:00
|
|
|
matrix-whatsapp = {
|
2023-06-27 18:26:31 +00:00
|
|
|
image = "dock.mau.dev/mautrix/whatsapp:v0.8.6";
|
2023-03-18 23:54:53 +00:00
|
|
|
ports = [ "127.0.0.1:29318:29318" ];
|
|
|
|
volumes = [
|
2023-06-21 12:21:40 +00:00
|
|
|
"/var/lib/matrix-bridges/whatsapp:/data"
|
2023-03-18 23:54:53 +00:00
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-06-23 18:08:22 +00:00
|
|
|
systemd.services = {
|
|
|
|
podman-signald.restartTriggers = [
|
|
|
|
"${config.age.secrets.signald-environment.file}"
|
|
|
|
];
|
|
|
|
|
|
|
|
podman-matrix-signal.restartTriggers = [
|
|
|
|
"${config.age.secrets.mautrix-signal-config.file}"
|
|
|
|
];
|
|
|
|
|
|
|
|
podman-matrix-whatsapp.restartTriggers = [
|
|
|
|
"${config.age.secrets.mautrix-whatsapp-config.file}"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2023-03-18 23:54:53 +00:00
|
|
|
systemd.tmpfiles.rules = [
|
2023-06-21 12:21:40 +00:00
|
|
|
"d /var/lib/matrix-bridges/signald 0775 0 0"
|
|
|
|
"d /var/lib/matrix-bridges/signal 0775 1337 1337"
|
|
|
|
"d /var/lib/matrix-bridges/whatsapp 0775 1337 1337"
|
2023-03-18 23:54:53 +00:00
|
|
|
];
|
|
|
|
}
|