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

28 lines
835 B
Nix
Raw Normal View History

2024-03-18 21:00:48 +01:00
{ config, pkgs, nixos-artwork, ... }: {
2024-03-06 13:22:22 +01:00
2024-03-04 19:05:30 +01:00
services.paperless = {
enable = true;
2024-03-09 16:50:33 +01:00
address = "0.0.0.0";
2024-03-18 21:00:48 +01:00
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;
};
2024-03-04 19:05:30 +01:00
};
2024-03-06 13:22:22 +01:00
networking.firewall.interfaces.wg0.allowedTCPPorts = [ config.services.paperless.port ];
2024-03-04 19:05:30 +01:00
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;
};
};
}