services: paperless: fix redis server warning

This commit is contained in:
Antoine Martin 2021-12-22 20:01:54 +01:00
parent 516cbd4ae7
commit 42a9f0def3

View file

@ -40,20 +40,26 @@ in
PAPERLESS_TIME_ZONE = config.time.timeZone; PAPERLESS_TIME_ZONE = config.time.timeZone;
PAPERLESS_ADMIN_USER = "alarsyo"; 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 = { systemd.services = {
paperless-ng-server.serviceConfig = { paperless-ng-server.serviceConfig = {
EnvironmentFile = secretKeyFile; EnvironmentFile = secretKeyFile;
BindReadOnlyPaths = [ config.services.redis.servers.paperless.unixSocket ];
}; };
paperless-ng-consumer.serviceConfig = { paperless-ng-consumer.serviceConfig = {
EnvironmentFile = secretKeyFile; EnvironmentFile = secretKeyFile;
BindReadOnlyPaths = [ config.services.redis.servers.paperless.unixSocket ];
}; };
paperless-ng-web.serviceConfig = { paperless-ng-web.serviceConfig = {
EnvironmentFile = secretKeyFile; 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 = { systemd.services.paperless-ng-server = {
# Make sure the DB is available # Make sure the DB is available
after = [ "postgresql.service" ]; 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 { my.services.restic-backup = mkIf cfg.enable {
paths = [ paths = [
config.services.paperless-ng.dataDir config.services.paperless-ng.dataDir