Use latest paperless version

This commit is contained in:
Benjamin Bädorf 2023-02-08 00:31:55 +01:00
parent 354a373795
commit 4febb87d2a
No known key found for this signature in database
GPG key ID: 4406E80E13CD656C

View file

@ -2,6 +2,7 @@
lib, lib,
config, config,
pkgs, pkgs,
masterModulesPath,
... ...
}: }:
with lib; let with lib; let
@ -9,6 +10,14 @@ with lib; let
cfg = config.pub-solar.paperless; cfg = config.pub-solar.paperless;
xdg = config.home-manager.users."${psCfg.user.name}".xdg; xdg = config.home-manager.users."${psCfg.user.name}".xdg;
in { in {
imports = [
"${masterModulesPath}/services/misc/paperless.nix"
];
disabledModules = [
"services/misc/paperless.nix"
];
options.pub-solar.paperless = { options.pub-solar.paperless = {
enable = mkEnableOption "All you need to go paperless"; enable = mkEnableOption "All you need to go paperless";
ocrLanguage = mkOption { ocrLanguage = mkOption {
@ -17,23 +26,33 @@ in {
example = "eng+deu"; example = "eng+deu";
default = "eng"; default = "eng";
}; };
dataDir = mkOption {
description = "Directory to save data in";
type = types.str;
example = "/home/pub_solar/Paperless";
default = "/home/${psCfg.user.name}/Paperless";
};
consumptionDir = mkOption { consumptionDir = mkOption {
description = "Directory to be watched"; description = "Directory to be watched";
type = types.str; type = types.str;
example = "/var/lib/paperless/consume"; example = "/var/lib/paperless/consume";
default = "/home/${psCfg.user.name}/Documents"; default = "/var/lib/paperless/consume";
}; };
scannerDefaultDevice = mkOption { scannerDefaultDevice = mkOption {
description = '' The scanner device. To find this, use `scanimage -L`. description = ''
The scanner device. To find this, use `scanimage -L`.
For example, your output might be the following: For example, your output might be the following:
``` ```
device `v4l:/dev/video3' is a Noname Logitech StreamCam virtual device device `v4l:/dev/video3' is a Noname Logitech StreamCam virtual device
device `hp3900:libusb:005:002' is a Hewlett-Packard Scanjet G3010 flatbed scanner device `hp3900:libusb:005:002' is a Hewlett-Packard Scanjet G3010 flatbed scanner
``` ```
Here, the scannerDevice is `hp3900:libusb:005:002`. Here, the scannerDevice is `hp3900:libusb:005:002`.
''; '';
type = types.str; type = types.str;
}; };
@ -44,6 +63,7 @@ in {
enable = true; enable = true;
user = psCfg.user.name; user = psCfg.user.name;
consumptionDir = cfg.consumptionDir; consumptionDir = cfg.consumptionDir;
dataDir = cfg.dataDir;
address = "paperless.local"; address = "paperless.local";
extraConfig = { extraConfig = {
PAPERLESS_OCR_LANGUAGE = cfg.ocrLanguage; PAPERLESS_OCR_LANGUAGE = cfg.ocrLanguage;