Revert "nixos/matrix-synapse: use python to launch synapse"

This reverts commit eb753318b3.

The homeserver script has been restored with commit
0c663e9032.
This commit is contained in:
pacien 2019-02-23 20:58:28 +01:00
parent 0c663e9032
commit cb15d762f4

View File

@ -651,16 +651,12 @@ in {
services.postgresql.enable = mkIf usePostgresql (mkDefault true);
systemd.services.matrix-synapse =
let
python = (pkgs.python3.withPackages (ps: with ps; [ (ps.toPythonModule cfg.package) ]));
in
{
systemd.services.matrix-synapse = {
description = "Synapse Matrix homeserver";
after = [ "network.target" "postgresql.service" ];
wantedBy = [ "multi-user.target" ];
preStart = ''
${python.interpreter} -m synapse.app.homeserver \
${cfg.package}/bin/homeserver \
--config-path ${configFile} \
--keys-directory ${cfg.dataDir} \
--generate-keys
@ -691,7 +687,7 @@ in {
WorkingDirectory = cfg.dataDir;
PermissionsStartOnly = true;
ExecStart = ''
${python.interpreter} -m synapse.app.homeserver \
${cfg.package}/bin/homeserver \
${ concatMapStringsSep "\n " (x: "--config-path ${x} \\") ([ configFile ] ++ cfg.extraConfigFiles) }
--keys-directory ${cfg.dataDir}
'';