Add 'old-conf/' from commit '62a64a79a8'
git-subtree-dir: old-conf git-subtree-mainline:4667974392git-subtree-split:62a64a79a8
This commit is contained in:
commit
83de52d5db
195 changed files with 13408 additions and 0 deletions
32
old-conf/nixos-modules/services/paperless.nix
Normal file
32
old-conf/nixos-modules/services/paperless.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ config, inputs, lib, pkgs, ... }:
|
||||
with lib;
|
||||
with lib.my;
|
||||
let
|
||||
cfg = config.ragon.services.paperless;
|
||||
domain = config.ragon.services.nginx.domain;
|
||||
in
|
||||
{
|
||||
options.ragon.services.paperless.enable = mkEnableOption "Enables paperless ng";
|
||||
options.ragon.services.paperless.location =
|
||||
lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "http://${config.services.paperless.address}:${toString config.services.paperless.port}";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
services.paperless = {
|
||||
enable = true;
|
||||
mediaDir = mkDefault "/data/documents/paperless";
|
||||
consumptionDir = "/data/applications/paperless-consumption";
|
||||
consumptionDirIsPublic = true;
|
||||
passwordFile = "${config.age.secrets.paperlessAdminPW.path}";
|
||||
extraConfig = {
|
||||
PAPERLESS_OCR_LANGUAGE = "deu+eng";
|
||||
PAPERLESS_TIME_ZONE = config.time.timeZone;
|
||||
};
|
||||
};
|
||||
ragon.agenix.secrets.paperlessAdminPW = { group = "${config.services.paperless.user}"; mode = "0440"; };
|
||||
ragon.persist.extraDirectories = [
|
||||
"${config.services.paperless.dataDir}"
|
||||
];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue