mirror of
https://github.com/JulienMalka/snowfield.git
synced 2025-06-08 02:09:04 +02:00
Added paperless service
This commit is contained in:
parent
f01fd4e8ca
commit
37799b141b
2 changed files with 70 additions and 0 deletions
46
modules/paperless/default.nix
Normal file
46
modules/paperless/default.nix
Normal 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))]);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue