mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 07:23:20 +00:00
nixos/matrix-synapse: use python to launch synapse
launch synapse with the python executable because the startup script is no longer available
This commit is contained in:
parent
863e49e3ee
commit
eb753318b3
@ -651,12 +651,16 @@ in {
|
||||
|
||||
services.postgresql.enable = mkIf usePostgresql (mkDefault true);
|
||||
|
||||
systemd.services.matrix-synapse = {
|
||||
systemd.services.matrix-synapse =
|
||||
let
|
||||
python = (pkgs.python3.withPackages (ps: with ps; [ (ps.toPythonModule cfg.package) ]));
|
||||
in
|
||||
{
|
||||
description = "Synapse Matrix homeserver";
|
||||
after = [ "network.target" "postgresql.service" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
preStart = ''
|
||||
${cfg.package}/bin/homeserver \
|
||||
${python.interpreter} -m synapse.app.homeserver \
|
||||
--config-path ${configFile} \
|
||||
--keys-directory ${cfg.dataDir} \
|
||||
--generate-keys
|
||||
@ -687,7 +691,7 @@ in {
|
||||
WorkingDirectory = cfg.dataDir;
|
||||
PermissionsStartOnly = true;
|
||||
ExecStart = ''
|
||||
${cfg.package}/bin/homeserver \
|
||||
${python.interpreter} -m synapse.app.homeserver \
|
||||
${ concatMapStringsSep "\n " (x: "--config-path ${x} \\") ([ configFile ] ++ cfg.extraConfigFiles) }
|
||||
--keys-directory ${cfg.dataDir}
|
||||
'';
|
||||
|
Loading…
Reference in New Issue
Block a user