Skip to content

Commit 9dee4ae

Browse files
nixos/paperless: Support remote databases (NixOS#368137)
2 parents a2fe10d + fe0b1ec commit 9dee4ae

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

nixos/modules/services/misc/paperless.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,7 @@ in
331331
ExecStart = "${cfg.package}/bin/celery --app paperless beat --loglevel INFO";
332332
Restart = "on-failure";
333333
LoadCredential = lib.optionalString (cfg.passwordFile != null) "PAPERLESS_ADMIN_PASSWORD:${cfg.passwordFile}";
334+
PrivateNetwork = cfg.database.createLocally; # defaultServiceConfig enables this by default, needs to be disabled for remote DBs
334335
};
335336
environment = env;
336337

@@ -407,6 +408,7 @@ in
407408
User = cfg.user;
408409
ExecStart = "${cfg.package}/bin/paperless-ngx document_consumer";
409410
Restart = "on-failure";
411+
PrivateNetwork = cfg.database.createLocally; # defaultServiceConfig enables this by default, needs to be disabled for remote DBs
410412
};
411413
environment = env;
412414
# Allow the consumer to access the private /tmp directory of the server.

0 commit comments

Comments
 (0)