Skip to content

Commit 706a93a

Browse files
committed
feat: paperless
1 parent 7fe08b8 commit 706a93a

3 files changed

Lines changed: 55 additions & 0 deletions

File tree

custom_modules/core_services.nix

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,18 @@ in
102102
reverse_proxy localhost:5123
103103
}
104104
105+
handle_path /searx* {
106+
reverse_proxy 127.0.0.1:3838
107+
}
108+
109+
handle /ntopng* {
110+
reverse_proxy 100.74.54.40:3123
111+
}
112+
113+
handle /paperless* {
114+
reverse_proxy localhost:28981
115+
}
116+
105117
handle {
106118
reverse_proxy 127.0.0.1:8082
107119
}
@@ -191,6 +203,33 @@ in
191203
};
192204
};
193205
}
206+
{
207+
"SearX" = {
208+
icon = "searxng"; # or "searx"
209+
href = "/searx/";
210+
description = "Private Search Engine";
211+
};
212+
}
213+
{
214+
"Ntopng" = {
215+
icon = "ntopng";
216+
href = "/ntopng/";
217+
description = "Network Traffic Monitor";
218+
};
219+
}
220+
{
221+
"Paperless" = {
222+
icon = "paperless-ngx";
223+
href = "/paperless/"; # Browser link
224+
description = "Document Manager";
225+
widget = {
226+
type = "paperlessngx";
227+
# Note: We must include /paperless in the internal URL too
228+
url = "http://127.0.0.1:28981/paperless";
229+
key = "YOUR_LONG_API_TOKEN_HERE";
230+
};
231+
};
232+
}
194233
];
195234
}
196235
];

custom_modules/jellyfin.nix

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,18 @@ in
270270
# consumptionDir = "/var/lib/paperless/in";
271271
# consumptionDirIsPublic = true;
272272
address = "0.0.0.0";
273+
settings = {
274+
# 1. This is the Magic Switch: Tells Paperless "I live in this folder"
275+
PAPERLESS_FORCE_SCRIPT_NAME = "/paperless";
276+
PAPERLESS_STATIC_URL = "/paperless/static/";
277+
278+
# 2. Your full public URL (Must include /paperless at the end)
279+
PAPERLESS_URL = "https://office-desktop.tail5ca7.ts.net/paperless";
280+
281+
# 3. Security settings to allow the connection
282+
PAPERLESS_CSRF_TRUSTED_ORIGINS = "https://office-desktop.tail5ca7.ts.net";
283+
PAPERLESS_ALLOWED_HOSTS = "office-desktop.tail5ca7.ts.net,localhost,127.0.0.1";
284+
};
273285
};
274286
users.users.paperless = {
275287
shell = pkgs.bashInteractive;
@@ -435,6 +447,9 @@ in
435447
services.vnstat.enable = true;
436448
services.ntopng.enable = true;
437449
services.ntopng.httpPort = 3123;
450+
services.ntopng.extraConfig = ''
451+
--http-prefix="/ntopng"
452+
'';
438453

439454
services.opensnitch.enable = true;
440455

custom_modules/workstation_services.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,7 @@ in
355355
enable = true;
356356
redisCreateLocally = true;
357357
settings.server = {
358+
base_url = "https://office-desktop.tail5ca7.ts.net/searx";
358359
bind_address = "0.0.0.0";
359360
port = "3838";
360361
secret_key = "secret key";

0 commit comments

Comments
 (0)