From 42a9f0def31fd6c8b717726ac2276c9085349417 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Wed, 22 Dec 2021 20:01:54 +0100 Subject: [PATCH] services: paperless: fix redis server warning --- services/paperless.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/services/paperless.nix b/services/paperless.nix index d358a6a..6341139 100644 --- a/services/paperless.nix +++ b/services/paperless.nix @@ -40,20 +40,26 @@ in PAPERLESS_TIME_ZONE = config.time.timeZone; PAPERLESS_ADMIN_USER = "alarsyo"; + + # FIXME: upstream module should be fixed instead of setting the redis URL myself + PAPERLESS_REDIS = "unix://${config.services.redis.servers.paperless.unixSocket}"; }; }; systemd.services = { paperless-ng-server.serviceConfig = { EnvironmentFile = secretKeyFile; + BindReadOnlyPaths = [ config.services.redis.servers.paperless.unixSocket ]; }; paperless-ng-consumer.serviceConfig = { EnvironmentFile = secretKeyFile; + BindReadOnlyPaths = [ config.services.redis.servers.paperless.unixSocket ]; }; paperless-ng-web.serviceConfig = { EnvironmentFile = secretKeyFile; + BindReadOnlyPaths = [ config.services.redis.servers.paperless.unixSocket ]; }; }; @@ -68,6 +74,8 @@ in ]; }; + services.redis.servers.paperless.enable = true; + systemd.services.paperless-ng-server = { # Make sure the DB is available after = [ "postgresql.service" ]; @@ -99,6 +107,10 @@ in }; }; + users.users.${config.services.paperless-ng.user} = { + extraGroups = [ config.services.redis.servers.paperless.user ]; + }; + my.services.restic-backup = mkIf cfg.enable { paths = [ config.services.paperless-ng.dataDir