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,
config,
pkgs,
masterModulesPath,
...
}:
with lib; let
@ -9,6 +10,14 @@ with lib; let
cfg = config.pub-solar.paperless;
xdg = config.home-manager.users."${psCfg.user.name}".xdg;
in {
imports = [
"${masterModulesPath}/services/misc/paperless.nix"
];
disabledModules = [
"services/misc/paperless.nix"
];
options.pub-solar.paperless = {
enable = mkEnableOption "All you need to go paperless";
ocrLanguage = mkOption {
@ -17,23 +26,33 @@ in {
example = "eng+deu";
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 {
description = "Directory to be watched";
type = types.str;
example = "/var/lib/paperless/consume";
default = "/home/${psCfg.user.name}/Documents";
default = "/var/lib/paperless/consume";
};
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 `hp3900:libusb:005:002' is a Hewlett-Packard Scanjet G3010 flatbed scanner
```
```
device `v4l:/dev/video3' is a Noname Logitech StreamCam virtual device
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;
};
@ -44,6 +63,7 @@ in {
enable = true;
user = psCfg.user.name;
consumptionDir = cfg.consumptionDir;
dataDir = cfg.dataDir;
address = "paperless.local";
extraConfig = {
PAPERLESS_OCR_LANGUAGE = cfg.ocrLanguage;