From 63c7fe0819ce5255a59609f5b73be49da82060b8 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Mon, 28 Jan 2019 17:56:20 +0100 Subject: [PATCH] nixos/syncserver: use gunicorn As described in `syncserver`'s documentation. Makes it possible to run behind a reverse proxy. --- nixos/modules/services/networking/firefox/sync-server.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nixos/modules/services/networking/firefox/sync-server.nix b/nixos/modules/services/networking/firefox/sync-server.nix index 2ae3226e924f..03109652e982 100644 --- a/nixos/modules/services/networking/firefox/sync-server.nix +++ b/nixos/modules/services/networking/firefox/sync-server.nix @@ -13,7 +13,7 @@ let overrides = ${cfg.privateConfig} [server:main] - use = egg:Paste#http + use = egg:gunicorn host = ${cfg.listen.address} port = ${toString cfg.listen.port} @@ -135,7 +135,7 @@ in wantedBy = [ "multi-user.target" ]; path = [ pkgs.coreutils - (pkgs.python.withPackages (ps: [ pkgs.syncserver ps.pasteScript ps.requests ])) + (pkgs.python.withPackages (ps: [ pkgs.syncserver ps.gunicorn ])) ]; serviceConfig = { @@ -168,8 +168,9 @@ in chown ${user}:${group} ${defaultDbLocation} fi ''; + script = '' - paster serve ${syncServerIni} + gunicorn --paste ${syncServerIni} ''; };