summary refs log tree commit diff
path: root/nixos/modules/services/misc/paperless.nix
diff options
context:
space:
mode:
authorErik Arvstedt <erik.arvstedt@gmail.com>2022-09-05 10:12:39 +0200
committerErik Arvstedt <erik.arvstedt@gmail.com>2022-09-05 14:50:45 +0200
commit783f8f16c16ba47daffff2c6b92a96eb8bb5d363 (patch)
tree258ad1899042721dfe54a3d9bae9b940290f88fe /nixos/modules/services/misc/paperless.nix
parent310b9fe58d34a4d655778bf561e8fb021e2d4b70 (diff)
downloadnixpkgs-783f8f16c16ba47daffff2c6b92a96eb8bb5d363.tar
nixpkgs-783f8f16c16ba47daffff2c6b92a96eb8bb5d363.tar.gz
nixpkgs-783f8f16c16ba47daffff2c6b92a96eb8bb5d363.tar.bz2
nixpkgs-783f8f16c16ba47daffff2c6b92a96eb8bb5d363.tar.lz
nixpkgs-783f8f16c16ba47daffff2c6b92a96eb8bb5d363.tar.xz
nixpkgs-783f8f16c16ba47daffff2c6b92a96eb8bb5d363.tar.zst
nixpkgs-783f8f16c16ba47daffff2c6b92a96eb8bb5d363.zip
paperless: move `PYTHONPATH` definition to module
`paperless-ngx.pythonPath` was incomplete due to the missing paperless-ngx
source, so it had to be amended in the service.
Instead of amending it, define it entirely in the service.

This allows an override of `paperless-ngx.propagatedBuildInputs` to be reflected
in the service's PYTHONPATH.
Diffstat (limited to 'nixos/modules/services/misc/paperless.nix')
-rw-r--r--nixos/modules/services/misc/paperless.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/services/misc/paperless.nix b/nixos/modules/services/misc/paperless.nix
index c29824ee834..0a62af95f8f 100644
--- a/nixos/modules/services/misc/paperless.nix
+++ b/nixos/modules/services/misc/paperless.nix
@@ -297,7 +297,7 @@ in
       };
       environment = env // {
         PATH = mkForce pkg.path;
-        PYTHONPATH = "${pkg.pythonPath}:${pkg}/lib/paperless-ngx/src";
+        PYTHONPATH = "${pkg.python.pkgs.makePythonPath pkg.propagatedBuildInputs}:${pkg}/lib/paperless-ngx/src";
       };
       # Allow the web interface to access the private /tmp directory of the server.
       # This is required to support uploading files via the web interface.