diff options
Diffstat (limited to 'modules/dashboard')
| -rw-r--r-- | modules/dashboard/default.nix | 73 | ||||
| -rw-r--r-- | modules/dashboard/links.nix | 69 |
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"; + } +] |
