Commit b86ba024 authored by Tomodachi94's avatar Tomodachi94 Committed by Pascal Bach
Browse files

nixos/paperless: add system-paperless.slice

Non-breaking change.

Part of #279915.
parent 19710730
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -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;