diff options
author | Luke Granger-Brown <git@lukegb.com> | 2023-01-02 22:36:05 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-02 22:36:05 +0000 |
commit | 5a236902c3b0d705eec98f3124495b4cdbf6f5de (patch) | |
tree | 3264ee84db77e6cffd690ca2c0c9940a9ad6c16c /nixos/modules/services | |
parent | d77928b908e5acae8e78fbf69bcaa6ad8f5640c8 (diff) | |
parent | b406baead835cbc5e0bb4e316b89c8ddab2211fa (diff) |
Merge pull request #208723 from gador/paperless-ngx-add-poppler
paperless-ngx: fix build
Diffstat (limited to 'nixos/modules/services')
-rw-r--r-- | nixos/modules/services/misc/paperless.nix | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/nixos/modules/services/misc/paperless.nix b/nixos/modules/services/misc/paperless.nix index 33a8394dff2d2..1dddd147ac095 100644 --- a/nixos/modules/services/misc/paperless.nix +++ b/nixos/modules/services/misc/paperless.nix @@ -212,14 +212,14 @@ in systemd.services.paperless-scheduler = { description = "Paperless Celery Beat"; + wantedBy = [ "multi-user.target" ]; + wants = [ "paperless-consumer.service" "paperless-web.service" "paperless-task-queue.service" ]; serviceConfig = defaultServiceConfig // { User = cfg.user; ExecStart = "${pkg}/bin/celery --app paperless beat --loglevel INFO"; Restart = "on-failure"; }; environment = env; - wantedBy = [ "multi-user.target" ]; - wants = [ "paperless-consumer.service" "paperless-web.service" "paperless-task-queue.service" ]; preStart = '' ln -sf ${manage} ${cfg.dataDir}/paperless-manage @@ -248,6 +248,7 @@ in systemd.services.paperless-task-queue = { description = "Paperless Celery Workers"; + after = [ "paperless-scheduler.service" ]; serviceConfig = defaultServiceConfig // { User = cfg.user; ExecStart = "${pkg}/bin/celery --app paperless worker --loglevel INFO"; @@ -275,20 +276,24 @@ in systemd.services.paperless-consumer = { description = "Paperless document consumer"; + # Bind to `paperless-scheduler` so that the consumer never runs + # during migrations + bindsTo = [ "paperless-scheduler.service" ]; + after = [ "paperless-scheduler.service" ]; serviceConfig = defaultServiceConfig // { User = cfg.user; ExecStart = "${pkg}/bin/paperless-ngx document_consumer"; Restart = "on-failure"; }; environment = env; - # Bind to `paperless-scheduler` so that the consumer never runs - # during migrations - bindsTo = [ "paperless-scheduler.service" ]; - after = [ "paperless-scheduler.service" ]; }; systemd.services.paperless-web = { description = "Paperless web server"; + # Bind to `paperless-scheduler` so that the web server never runs + # during migrations + bindsTo = [ "paperless-scheduler.service" ]; + after = [ "paperless-scheduler.service" ]; serviceConfig = defaultServiceConfig // { User = cfg.user; ExecStart = '' @@ -312,10 +317,6 @@ in # Allow the web interface to access the private /tmp directory of the server. # This is required to support uploading files via the web interface. unitConfig.JoinsNamespaceOf = "paperless-task-queue.service"; - # Bind to `paperless-scheduler` so that the web server never runs - # during migrations - bindsTo = [ "paperless-scheduler.service" ]; - after = [ "paperless-scheduler.service" ]; }; users = optionalAttrs (cfg.user == defaultUser) { |