wiki: Initial implementation

Ideally this should be split into separate packages, but we'll see. This
commit enables two services for bebop:

- outline (getoutline.com)
  A personal notion.so - like note-taking and knowledge base.
  I do like and prefer org-mode, but this is nicer looking and useful
  for gen-pop.
- paperless
  To store all documents in PDF format plus automatically OCR them and
  query the OCR'ed text.
This commit is contained in:
Payas Relekar 2023-05-24 01:37:41 +05:30
parent 190888b699
commit 386427b7ee
2 changed files with 38 additions and 0 deletions

View file

@ -91,6 +91,7 @@
./modules/fish.nix
./modules/monitoring/monitoring.nix
./modules/calibre.nix
./modules/wiki.nix
# Host-specific config
nixos-hardware.nixosModules.raspberry-pi-4

37
modules/wiki.nix Normal file
View file

@ -0,0 +1,37 @@
{ ... }:
{
# Open paperless port, but only for local network
networking.firewall.extraCommands = ''
iptables -A nixos-fw -p tcp --source 192.168.0.0/24 --dport 28981:28981 -j nixos-fw-accept
iptables -A nixos-fw -p tcp --source 192.168.0.0/24 --dport 3000:3000 -j nixos-fw-accept
'';
services = {
paperless = {
enable = true;
port = 28981;
consumptionDirIsPublic = true;
extraConfig = {
PAPERLESS_DBHOST = "/run/postgresql";
PAPERLESS_OCR_LANGUAGE = "eng";
};
};
outline = {
enable = true;
port = 3000;
publicUrl = "http://192.168.0.7:3000";
enableUpdateCheck = false;
defaultLanguage = "en_US";
databaseUrl = "local";
redisUrl = "local";
concurrency = 4;
forceHttps = false;
rateLimiter = {
enable = true;
durationWindow = 60;
requests = 5000;
};
};
};
}