Skip to content

Commit cd04a1f

Browse files
committed
feat: sunshine added to homepage
1 parent 706a93a commit cd04a1f

File tree

2 files changed

+37
-19
lines changed

2 files changed

+37
-19
lines changed

custom_modules/core_services.nix

Lines changed: 33 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,23 @@ in
111111
}
112112
113113
handle /paperless* {
114-
reverse_proxy localhost:28981
114+
reverse_proxy localhost:28981 {
115+
header_up Remote-User "admin"
116+
}
117+
}
118+
119+
handle_path /nut* {
120+
reverse_proxy localhost:16180
121+
}
122+
123+
handle_path /sunshine* {
124+
reverse_proxy https://127.0.0.1:48012 {
125+
transport http {
126+
tls_insecure_skip_verify
127+
}
128+
header_up X-Forwarded-Proto {scheme}
129+
header_up X-Forwarded-Prefix /sunshine
130+
}
115131
}
116132
117133
handle {
@@ -224,12 +240,26 @@ in
224240
description = "Document Manager";
225241
widget = {
226242
type = "paperlessngx";
227-
# Note: We must include /paperless in the internal URL too
228243
url = "http://127.0.0.1:28981/paperless";
229-
key = "YOUR_LONG_API_TOKEN_HERE";
244+
key = "1046ca1ba2c462773d9b630c005f095718f657df";
230245
};
231246
};
232247
}
248+
{
249+
"UPS Status" = {
250+
icon = "nut"; # or "battery"
251+
# Link to the Prometheus Exporter text page (via Caddy)
252+
href = "/nut/metrics";
253+
description = "Power Backup";
254+
};
255+
}
256+
{
257+
"Sunshine" = {
258+
icon = "sunshine";
259+
href = "/sunshine/";
260+
description = "Login: username / password";
261+
};
262+
}
233263
];
234264
}
235265
];
@@ -321,21 +351,6 @@ in
321351
capSysAdmin = true;
322352
openFirewall = true;
323353
settings.port = 48011;
324-
# serviceConfig = {
325-
# IPEgressPriority = 1;
326-
# IPIngressPriority = 1;
327-
# Nice = -10;
328-
# CPUWeight = 1000;
329-
# IOSchedulingPriority = 0;
330-
# IOWeight = 1000;
331-
# # IOSchedulingClass = "best-effort"; # too aggressive imo
332-
# };
333-
# settings = {
334-
# port = 48011;
335-
# https_port = 48006;
336-
# web_ui_port = 48012;
337-
# rtsp_port = 48032;
338-
# };
339354
};
340355
systemd.user.services.sunshine.serviceConfig = {
341356
Nice = -10;

custom_modules/jellyfin.nix

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,11 +276,14 @@ in
276276
PAPERLESS_STATIC_URL = "/paperless/static/";
277277

278278
# 2. Your full public URL (Must include /paperless at the end)
279-
PAPERLESS_URL = "https://office-desktop.tail5ca7.ts.net/paperless";
279+
PAPERLESS_URL = "https://office-desktop.tail5ca7.ts.net";
280280

281281
# 3. Security settings to allow the connection
282282
PAPERLESS_CSRF_TRUSTED_ORIGINS = "https://office-desktop.tail5ca7.ts.net";
283+
PAPERLESS_CORS_ALLOWED_ORIGINS = "https://office-desktop.tail5ca7.ts.net";
283284
PAPERLESS_ALLOWED_HOSTS = "office-desktop.tail5ca7.ts.net,localhost,127.0.0.1";
285+
PAPERLESS_DISABLE_REGULAR_LOGIN = true;
286+
PAPERLESS_ENABLE_HTTP_REMOTE_USER = true;
284287
};
285288
};
286289
users.users.paperless = {

0 commit comments

Comments
 (0)