|
|
|
@ -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} |
|
|
|
|
''; |
|
|
|
|