summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorFrederik Rietdijk <freddyrietdijk@fridh.nl>2017-08-12 15:11:53 +0200
committerGitHub <noreply@github.com>2017-08-12 15:11:53 +0200
commitc06fb4a269d1b3f42238047f49f7742ce35488fe (patch)
treec4ab4c47e9612b1d7004a8586ca3615f63ce7644 /nixos/modules
parentf7a90867582c7c75223bdb034dfaceeb9fd68c3b (diff)
parentd6c1d2f793473d25838433cc882753982067496b (diff)
downloadnixlib-c06fb4a269d1b3f42238047f49f7742ce35488fe.tar
nixlib-c06fb4a269d1b3f42238047f49f7742ce35488fe.tar.gz
nixlib-c06fb4a269d1b3f42238047f49f7742ce35488fe.tar.bz2
nixlib-c06fb4a269d1b3f42238047f49f7742ce35488fe.tar.lz
nixlib-c06fb4a269d1b3f42238047f49f7742ce35488fe.tar.xz
nixlib-c06fb4a269d1b3f42238047f49f7742ce35488fe.tar.zst
nixlib-c06fb4a269d1b3f42238047f49f7742ce35488fe.zip
Merge pull request #28188 from Nadrieril/ffsync-fix-pythonpath
firefox syncserver service: fix PYTHONPATH
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/services/networking/firefox/sync-server.nix9
1 files changed, 5 insertions, 4 deletions
diff --git a/nixos/modules/services/networking/firefox/sync-server.nix b/nixos/modules/services/networking/firefox/sync-server.nix
index 3a95b9c4ec94..c1a14931429a 100644
--- a/nixos/modules/services/networking/firefox/sync-server.nix
+++ b/nixos/modules/services/networking/firefox/sync-server.nix
@@ -119,12 +119,13 @@ in
 
   config = mkIf cfg.enable {
 
-    systemd.services.syncserver = {
+    systemd.services.syncserver = let
+      syncServerEnv = pkgs.python.withPackages(ps: with ps; [ syncserver pasteScript ]);
+    in {
       after = [ "network.target" ];
       description = "Firefox Sync Server";
       wantedBy = [ "multi-user.target" ];
-      path = [ pkgs.pythonPackages.pasteScript pkgs.coreutils ];
-      environment.PYTHONPATH = "${pkgs.pythonPackages.syncserver}/lib/${pkgs.pythonPackages.python.libPrefix}/site-packages";
+      path = [ pkgs.coreutils syncServerEnv ];
       preStart = ''
         if ! test -e ${cfg.privateConfig}; then
           umask u=rwx,g=x,o=x
@@ -133,7 +134,7 @@ in
           echo >> ${cfg.privateConfig} "secret = $(head -c 20 /dev/urandom | sha1sum | tr -d ' -')"
         fi
       '';
-      serviceConfig.ExecStart = "${pkgs.pythonPackages.pasteScript}/bin/paster serve ${syncServerIni}";
+      serviceConfig.ExecStart = "${syncServerEnv}/bin/paster serve ${syncServerIni}";
     };
 
   };