aboutsummaryrefslogtreecommitdiff
path: root/modules/dashboard
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2025-06-15 15:43:45 +0530
committerAkshay Nair <phenax5@gmail.com>2025-06-15 15:59:27 +0530
commit926f411a4c703cab001d64b7f8b9701b79a7dc5c (patch)
treea95b94fe0061309b6b422c1c889f9595de439c53 /modules/dashboard
parent03d52d1317af446c513c0257f8c497fed2bfbad8 (diff)
downloadhomeserver-nixos-config-926f411a4c703cab001d64b7f8b9701b79a7dc5c.tar.gz
homeserver-nixos-config-926f411a4c703cab001d64b7f8b9701b79a7dc5c.zip
Refactor settings management + dashboard links
Diffstat (limited to 'modules/dashboard')
-rw-r--r--modules/dashboard/default.nix73
-rw-r--r--modules/dashboard/links.nix69
2 files changed, 73 insertions, 69 deletions
diff --git a/modules/dashboard/default.nix b/modules/dashboard/default.nix
index c7ad4eb..9bde252 100644
--- a/modules/dashboard/default.nix
+++ b/modules/dashboard/default.nix
@@ -1,7 +1,6 @@
-{ lib, ... }:
+{ settings, ... }:
let
- settings = import ../../settings.nix { inherit lib; };
- ports = settings.network.ports;
+ links = import ./links.nix { inherit settings; };
in
{
imports = [ ../../services/bacchus-dashboard/bacchus-dashboard.service.nix ];
@@ -9,73 +8,9 @@ in
services.bacchus-dashboard = {
enable = true;
openFirewall = true;
- port = ports.dashboard;
+ port = settings.network.ports.dashboard;
title = "Bacchus Dashboard";
embedLink = settings.grafana.dashboardEmbedLink;
- links = [
- {
- title = "Jellyfin";
- key = "j";
- url = "http://jellyfin.local";
- altUrl = "http://${settings.network.host}:${toString ports.jellyfin}";
- color = "#AA5CC3";
- }
- {
- title = "Jellyseer";
- key = "l";
- url = "http://jellyseerr.local";
- altUrl = "http://${settings.network.host}:${toString ports.jellyseerr}";
- color = "#5345e6";
- }
- {
- title = "Radarr";
- key = "r";
- url = "http://radarr.local";
- altUrl = "http://${settings.network.host}:${toString ports.radarr}";
- color = "#fcbd00";
- }
- {
- title = "Sonarr";
- key = "s";
- url = "http://sonarr.local";
- altUrl = "http://${settings.network.host}:${toString ports.sonarr}";
- color = "#4c82cf";
- }
- {
- title = "Prowlarr";
- key = "p";
- url = "http://prowlarr.local";
- altUrl = "http://${settings.network.host}:${toString ports.prowlarr}";
- color = "#ff9a7e";
- }
- {
- title = "Syncthing";
- key = "y";
- url = "http://syncthing.local";
- altUrl = "http://${settings.network.host}:${toString ports.syncthing}";
- color = "#0891d1";
- }
- {
- title = "Ntfy-sh";
- key = "n";
- url = "http://ntfy.local";
- altUrl = "http://${settings.network.host}:${toString ports.ntfy}";
- color = "#2dc9b5";
- }
- {
- title = "Grafana";
- key = "g";
- url = "http://grafana.local";
- altUrl = "http://${settings.network.host}:${toString ports.grafana}";
- color = "#f05a28";
- }
- {
- title = "Send";
- key = "f";
- url = "http://send.local";
- altUrl = "http://${settings.network.host}:${toString ports.send}";
- color = "#AA5CC3";
- }
- ];
+ links = links;
};
}
diff --git a/modules/dashboard/links.nix b/modules/dashboard/links.nix
new file mode 100644
index 0000000..9a89c2b
--- /dev/null
+++ b/modules/dashboard/links.nix
@@ -0,0 +1,69 @@
+{ settings }:
+let
+ ports = settings.network.ports;
+ host = settings.network.host;
+in [
+ {
+ title = "Jellyfin";
+ key = "j";
+ url = "http://jellyfin.local";
+ altUrl = "http://${host}:${toString ports.jellyfin}";
+ color = "#AA5CC3";
+ }
+ {
+ title = "Jellyseer";
+ key = "l";
+ url = "http://jellyseerr.local";
+ altUrl = "http://${host}:${toString ports.jellyseerr}";
+ color = "#5345e6";
+ }
+ {
+ title = "Radarr";
+ key = "r";
+ url = "http://radarr.local";
+ altUrl = "http://${host}:${toString ports.radarr}";
+ color = "#fcbd00";
+ }
+ {
+ title = "Sonarr";
+ key = "s";
+ url = "http://sonarr.local";
+ altUrl = "http://${host}:${toString ports.sonarr}";
+ color = "#4c82cf";
+ }
+ {
+ title = "Prowlarr";
+ key = "p";
+ url = "http://prowlarr.local";
+ altUrl = "http://${host}:${toString ports.prowlarr}";
+ color = "#ff9a7e";
+ }
+ {
+ title = "Syncthing";
+ key = "y";
+ url = "http://syncthing.local";
+ altUrl = "http://${host}:${toString ports.syncthing}";
+ color = "#0891d1";
+ }
+ {
+ title = "Ntfy-sh";
+ key = "n";
+ url = "http://ntfy.local";
+ altUrl = "http://${host}:${toString ports.ntfy}";
+ color = "#2dc9b5";
+ }
+ {
+ title = "Grafana";
+ key = "g";
+ url = "http://grafana.local";
+ altUrl = "http://${host}:${toString ports.grafana}";
+ color = "#f05a28";
+ }
+ {
+ title = "Send";
+ key = "f";
+ url = "http://send.local";
+ altUrl = "http://${host}:${toString ports.send}";
+ color = "#AA5CC3";
+ }
+]