modularization of all servers donion rings
This commit is contained in:
28
modules/servers/paperless.nix
Normal file
28
modules/servers/paperless.nix
Normal file
@@ -0,0 +1,28 @@
|
||||
{ lib, config, ... }: {
|
||||
options.my.servers.paperless.enable = lib.mkEnableOption "enable";
|
||||
config = lib.mkIf config.my.servers.paperless.enable {
|
||||
services.paperless = {
|
||||
enable = true;
|
||||
address = "0.0.0.0";
|
||||
consumptionDirIsPublic = true;
|
||||
consumptionDir = "/mnt/pool/scans/";
|
||||
settings = {
|
||||
PAPERLESS_DBENGINE = "postgress";
|
||||
PAPERLESS_DBNAME = "paperless";
|
||||
PAPERLESS_DBHOST = config.my.postgresSocket;
|
||||
PAPERLESS_CONSUMER_IGNORE_PATTERN =
|
||||
builtins.toJSON [ ".DS_STORE/*" "desktop.ini" ];
|
||||
PAPERLESS_TIME_ZONE = "America/Mexico_City";
|
||||
PAPERLESS_OCR_USER_ARGS = builtins.toJSON {
|
||||
optimize = 1;
|
||||
pdfa_image_compression = "lossless";
|
||||
};
|
||||
};
|
||||
};
|
||||
networking.firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [ config.services.paperless.port ];
|
||||
allowedUDPPorts = [ config.services.paperless.port ];
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user