diff options
author | Florian Brandes <florian.brandes@posteo.de> | 2023-01-02 15:22:37 +0100 |
---|---|---|
committer | Florian Brandes <florian.brandes@posteo.de> | 2023-01-02 16:25:34 +0100 |
commit | b406baead835cbc5e0bb4e316b89c8ddab2211fa (patch) | |
tree | 7f6d31e39b11632de184d3ddee487bcf8ba03a7a /nixos/modules/services | |
parent | 5b6881f4a0797cf7cc6c3350c4bc784a851e0124 (diff) |
nixos/paperless-ngx: reorder "after" keyword
Signed-off-by: Florian Brandes <florian.brandes@posteo.de>
Diffstat (limited to 'nixos/modules/services')
-rw-r--r-- | nixos/modules/services/misc/paperless.nix | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/nixos/modules/services/misc/paperless.nix b/nixos/modules/services/misc/paperless.nix index 54c53a0113438..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"; @@ -258,7 +259,6 @@ in PrivateNetwork = false; }; environment = env; - after = [ "paperless-scheduler.service" ]; }; # Reading the user-provided password file requires root access @@ -276,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 = '' @@ -313,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) { |