nixos-config/machines/chungus/service-paperless-tika.nix

37 lines
777 B
Nix
Raw Permalink Normal View History

{
config,
pkgs,
lib,
...
}:
{
services.paperless = {
settings = {
PAPERLESS_TIKA_ENABLED = true;
PAPERLESS_TIKA_ENDPOINT = "http://127.0.0.1:${toString config.services.tika.port}";
PAPERLESS_TIKA_GOTENBERG_ENDPOINT = "http://127.0.0.1:${toString config.services.gotenberg.port}";
};
};
services.tika = {
enable = true;
};
services.gotenberg = {
enable = true;
timeout = "300s";
port = 3214;
};
systemd.services.gotenberg = {
environment.HOME = "/run/gotenberg";
serviceConfig = {
SystemCallFilter = lib.mkAfter [ "@chown" ]; # TODO remove when fixed (https://github.com/NixOS/nixpkgs/issues/349123)
WorkingDirectory = "/run/gotenberg";
RuntimeDirectory = "gotenberg";
};
};
}