pythonPackages.syncserver: move to all-packages.nix and fix dependencies

This commit is contained in:
Nadrieril
2019-01-30 15:59:00 +01:00
parent 08aa3e7f2e
commit 957d0589ad
5 changed files with 56 additions and 47 deletions
@@ -127,14 +127,16 @@ in
config = mkIf cfg.enable {
systemd.services.syncserver = let
syncServerEnv = pkgs.python.withPackages(ps: with ps; [ syncserver pasteScript requests ]);
user = "syncserver";
group = "syncserver";
in {
after = [ "network.target" ];
description = "Firefox Sync Server";
wantedBy = [ "multi-user.target" ];
path = [ pkgs.coreutils syncServerEnv ];
path = [
pkgs.coreutils
(pkgs.python.withPackages (ps: [ pkgs.syncserver ps.pasteScript ps.requests ]))
];
serviceConfig = {
User = user;
@@ -166,7 +168,9 @@ in
chown ${user}:${group} ${defaultDbLocation}
fi
'';
serviceConfig.ExecStart = "${syncServerEnv}/bin/paster serve ${syncServerIni}";
script = ''
paster serve ${syncServerIni}
'';
};
users.users.syncserver = {