Added paperless service

This commit is contained in:
Julien Malka 2022-02-26 22:43:10 +01:00
parent f01fd4e8ca
commit 37799b141b
No known key found for this signature in database
GPG key ID: 3C68E13964FEA07F
2 changed files with 70 additions and 0 deletions

View file

@ -0,0 +1,46 @@
{ lib, pkgs, config, ... }:
with lib;
let
cfg = config.luj.jackett;
port = 28981;
in
{
options.luj.jackett = {
enable = mkEnableOption "activate paperless service";
user = mkOption {
type = types.str;
default = "paperless";
description = "User account under which Paperless runs.";
};
nginx.enable = mkEnableOption "activate nginx";
nginx.subdomain = mkOption {
type = types.str;
};
};
config = mkIf cfg.enable (
mkMerge [{
services.paperless-ng = {
enable = true;
user = cfg.user;
mediaDir = "/home/julien/papers";
extraConfig = {
PAPERLESS_OCR_LANGUAGE = "fre+eng";
PAPERLESS_OCR_MODE = "redo";
PAPERLESS_TIME_ZONE = "Europe/Paris";
};
};
}
(mkIf cfg.nginx.enable (mkVPNSubdomain cfg.nginx.subdomain port))]);
}