{ config, pkgs, nixos-artwork, ... }: { services.paperless = { enable = true; address = "0.0.0.0"; package = pkgs.unstable.paperless; extraConfig = { PAPERLESS_OCR_LANGUAGE = "deu+eng"; PAPERLESS_APP_TITLE = "paperless.chungus.private"; PAPERLESS_CONSUMER_IGNORE_PATTERN = builtins.toJSON [ ".DS_STORE/*" "desktop.ini" ]; #PAPERLESS_CONSUMER_DELETE_DUPLICATES = true; }; }; networking.firewall.interfaces.wg0.allowedTCPPorts = [ config.services.paperless.port ]; services.nginx.virtualHosts."paperless.${config.networking.hostName}.private" = { extraConfig = '' allow ${config.tinc.private.subnet}; deny all; ''; locations."/" = { proxyPass = "http://localhost:${toString config.services.paperless.port}"; proxyWebsockets = true; }; }; }