nixos/paperless: add system-paperless.slice

Non-breaking change.

Part of #279915.
This commit is contained in:
Tomodachi94
2024-09-14 14:19:17 +02:00
committed by Pascal Bach
parent 19710730d7
commit b86ba024bd
+7 -1
View File
@@ -40,8 +40,9 @@ let
exec ${cfg.package}/bin/paperless-ngx "$@"
'';
# Secure the services
defaultServiceConfig = {
Slice = "system-paperless.slice";
# Secure the services
ReadWritePaths = [
cfg.consumptionDir
cfg.dataDir
@@ -232,6 +233,11 @@ in
config = mkIf cfg.enable {
services.redis.servers.paperless.enable = mkIf enableRedis true;
systemd.slices.system-paperless = {
description = "Paperless slice";
documentation = [ "https://paperless.readthedocs.io" ];
};
systemd.tmpfiles.settings."10-paperless" = let
defaultRule = {
inherit (cfg) user;