summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authornyanloutre <paul@nyanlout.re>2019-02-06 15:55:06 +0100
committernyanloutre <paul@nyanlout.re>2019-02-06 16:21:07 +0100
commiteb753318b3716921d3ab3b1887385a5ee92b1884 (patch)
tree46a3067d257033a46ff58a2d851116254feae9ed /nixos
parent863e49e3ee86517730c6600797f2dbbc2b746d5a (diff)
downloadnixpkgs-eb753318b3716921d3ab3b1887385a5ee92b1884.tar
nixpkgs-eb753318b3716921d3ab3b1887385a5ee92b1884.tar.gz
nixpkgs-eb753318b3716921d3ab3b1887385a5ee92b1884.tar.bz2
nixpkgs-eb753318b3716921d3ab3b1887385a5ee92b1884.tar.lz
nixpkgs-eb753318b3716921d3ab3b1887385a5ee92b1884.tar.xz
nixpkgs-eb753318b3716921d3ab3b1887385a5ee92b1884.tar.zst
nixpkgs-eb753318b3716921d3ab3b1887385a5ee92b1884.zip
nixos/matrix-synapse: use python to launch synapse
launch synapse with the python executable because the startup script is
no longer available
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/misc/matrix-synapse.nix10
1 files changed, 7 insertions, 3 deletions
diff --git a/nixos/modules/services/misc/matrix-synapse.nix b/nixos/modules/services/misc/matrix-synapse.nix
index 18e13f6ac03..216898d5088 100644
--- a/nixos/modules/services/misc/matrix-synapse.nix
+++ b/nixos/modules/services/misc/matrix-synapse.nix
@@ -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}
         '';