renge/mautrix-signal: Allow file transfer
mautrix-whatsapp places a file in /tmp/ for file transfers. However, signald is running with PrivateTemp=true. This uses systemd’s feature that allows a unit to share a namespace with another one and places mautrix-signal in the same namespace as signald, so they share their private tmp directory.
This commit is contained in:
parent
f51bc637da
commit
18dab0ab94
|
@ -85,12 +85,17 @@ in
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
DynamicUser = true;
|
DynamicUser = true;
|
||||||
|
PrivateTmp = true;
|
||||||
SupplementaryGroups = [ "signald" ];
|
SupplementaryGroups = [ "signald" ];
|
||||||
StateDirectory = "mautrix-signal";
|
StateDirectory = "mautrix-signal";
|
||||||
WorkingDirectory = "/var/lib/mautrix-signal";
|
WorkingDirectory = "/var/lib/mautrix-signal";
|
||||||
ExecStart = "${pkgs.mautrix-signal}/bin/mautrix-signal -c ${generatedConfig}/config.yaml";
|
ExecStart = "${pkgs.mautrix-signal}/bin/mautrix-signal -c ${generatedConfig}/config.yaml";
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
unitConfig = {
|
||||||
|
JoinsNamespaceOf = "signald.service";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services.matrix-synapse.settings.app_service_config_files = lib.singleton "${generatedConfig}/registration.yaml";
|
services.matrix-synapse.settings.app_service_config_files = lib.singleton "${generatedConfig}/registration.yaml";
|
||||||
|
|
Loading…
Reference in a new issue