services: paperless: redis changes are upstreamed

This commit is contained in:
Antoine Martin 2022-03-18 11:25:10 +01:00
parent a155d1b185
commit 8c21d60d8c

View file

@ -58,26 +58,20 @@ 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 = cfg.secretKeyFile;
BindReadOnlyPaths = [ config.services.redis.servers.paperless.unixSocket ];
};
paperless-ng-consumer.serviceConfig = {
EnvironmentFile = cfg.secretKeyFile;
BindReadOnlyPaths = [ config.services.redis.servers.paperless.unixSocket ];
};
paperless-ng-web.serviceConfig = {
EnvironmentFile = cfg.secretKeyFile;
BindReadOnlyPaths = [ config.services.redis.servers.paperless.unixSocket ];
};
};
@ -92,11 +86,9 @@ in
];
};
services.redis.servers.paperless.enable = true;
systemd.services.paperless-ng-server = {
# Make sure the DB is available
after = [ "postgresql.service" "redis-paperless.service" ];
after = [ "postgresql.service" ];
};
services.nginx.virtualHosts = {
@ -125,10 +117,6 @@ 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