attempt to write paperless config
This commit is contained in:
parent
90fc470aa7
commit
61cfdd25e7
3 changed files with 74 additions and 1 deletions
|
|
@ -3,11 +3,19 @@
|
||||||
|
|
||||||
time.timeZone = "Europe/Berlin";
|
time.timeZone = "Europe/Berlin";
|
||||||
|
|
||||||
|
# we want at least a possibility to download stuff, monitor activity and sudo
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
wget
|
wget
|
||||||
|
htop
|
||||||
sudo
|
sudo
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# because getting a nix shell is super annoying otherwise
|
||||||
|
nix.settings.experimental-features = [
|
||||||
|
"nix-command"
|
||||||
|
"flakes"
|
||||||
|
];
|
||||||
|
|
||||||
# zsh because I like it :3
|
# zsh because I like it :3
|
||||||
programs.zsh.enable = true;
|
programs.zsh.enable = true;
|
||||||
|
|
||||||
|
|
|
||||||
51
configs/services/paperless.nix
Normal file
51
configs/services/paperless.nix
Normal file
|
|
@ -0,0 +1,51 @@
|
||||||
|
{ lib, pkgs, config, ... }:
|
||||||
|
let
|
||||||
|
dbname = "paperless";
|
||||||
|
dbuser = "paperless";
|
||||||
|
dbpass = "paperless";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
|
||||||
|
services.paperless = {
|
||||||
|
enable = true;
|
||||||
|
consumptionDirIsPublic = true;
|
||||||
|
address = "192.168.178.51";
|
||||||
|
user = dbuser;
|
||||||
|
settings = {
|
||||||
|
PAPERLESS_CONSUMER_IGNORE_PATTERN = [
|
||||||
|
".DS_STORE/*"
|
||||||
|
"desktop.ini"
|
||||||
|
];
|
||||||
|
PAPERLESS_OCR_LANGUAGE = "deu+eng";
|
||||||
|
PAPERLESS_TIME_ZONE = "Europe/Berlin";
|
||||||
|
PAPERLESS_CONSUMER_ENABLE_BARCODES = true;
|
||||||
|
PAPERLESS_CONSUMER_ENABLE_ASN_BARCODE = true;
|
||||||
|
PAPERLESS_CONSUMER_BARCODE_SCANNER = "ZXING";
|
||||||
|
PAPERLESS_OCR_USER_ARGS = {
|
||||||
|
optimize = 1;
|
||||||
|
pdfa_image_compression = "lossless";
|
||||||
|
};
|
||||||
|
PAPERLESS_DBENGINE = "postgres";
|
||||||
|
PAPERLESS_DBHOST = "/run/postgresql";
|
||||||
|
PAPERLESS_DUSER = dbuser;
|
||||||
|
PAPERLESS_DBNAME = dbname;
|
||||||
|
PAPERLESS_DBPASS = dbpass;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# enable a PostgreSQL DB
|
||||||
|
services.postgresql = {
|
||||||
|
enable = true;
|
||||||
|
ensureDatabases = [ dbname ];
|
||||||
|
ensureUsers = [{
|
||||||
|
name = dbuser;
|
||||||
|
ensureDBOwnership = true;
|
||||||
|
}];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Paperless-ngx also requires a redis cache
|
||||||
|
services.redis.enable = true;
|
||||||
|
|
||||||
|
# 28981 is the default paperless web port
|
||||||
|
networking.firewall.allowedTCPPorts = [ 28981 ];
|
||||||
|
}
|
||||||
16
flake.nix
16
flake.nix
|
|
@ -22,6 +22,20 @@
|
||||||
./configs/services/minecraft-server.nix
|
./configs/services/minecraft-server.nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
testserver = {
|
||||||
|
deployment = {
|
||||||
|
targetHost = "192.168.178.51";
|
||||||
|
targetPort = 22;
|
||||||
|
targetUser = "root";
|
||||||
|
};
|
||||||
|
networking.hostName = "testserver";
|
||||||
|
imports = [
|
||||||
|
./configs/container_config.nix
|
||||||
|
./configs/services/paperless.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue