From b19b7b6dce94982d31d3ca56e34b04b46d681ea1 Mon Sep 17 00:00:00 2001 From: xunuwu Date: Fri, 2 May 2025 10:59:15 +0200 Subject: [PATCH] add some more info on my homepage dashboard --- sys/machines/hopper/lab/homepage.nix | 13 +++++++++++++ sys/machines/hopper/lab/prometheus.nix | 11 +++++++++++ sys/machines/hopper/lab/transmission.nix | 8 +++++--- sys/machines/hopper/lab/vpn-namespace.nix | 4 ++-- 4 files changed, 31 insertions(+), 5 deletions(-) diff --git a/sys/machines/hopper/lab/homepage.nix b/sys/machines/hopper/lab/homepage.nix index 2f731bf..126d0f2 100644 --- a/sys/machines/hopper/lab/homepage.nix +++ b/sys/machines/hopper/lab/homepage.nix @@ -4,6 +4,7 @@ ... }: let inherit (vars.common) domain; + bridge = config.vpnNamespaces."wg".bridgeAddress; in { services.homepage-dashboard = { enable = true; @@ -28,6 +29,10 @@ in { "transmission" = { href = "http://transmission.hopper.xun.host"; icon = "transmission"; + widget = { + type = "transmission"; + url = "http://${config.vpnNamespaces."wg".namespaceAddress}:${toString config.services.transmission.settings.rpc-port}"; + }; }; } { @@ -56,12 +61,20 @@ in { "adguard home" = { href = "http://adguard.hopper.xun.host"; icon = "adguard-home"; + widget = { + type = "adguard"; + url = "http://localhost:${toString config.services.adguardhome.port}"; + }; }; } { "prometheus" = { href = "http://prometheus.hopper.xun.host"; icon = "prometheus"; + widget = { + type = "prometheus"; + url = "http://localhost:${toString config.services.prometheus.port}"; + }; }; } { diff --git a/sys/machines/hopper/lab/prometheus.nix b/sys/machines/hopper/lab/prometheus.nix index 13c7e2e..86050af 100644 --- a/sys/machines/hopper/lab/prometheus.nix +++ b/sys/machines/hopper/lab/prometheus.nix @@ -26,6 +26,17 @@ targets = ["${config.vpnNamespaces."wg".namespaceAddress}:2019"]; }; } + { + job_name = "slskd"; + static_configs = lib.singleton { + targets = ["${config.vpnNamespaces."wg".namespaceAddress}:${toString config.services.slskd.settings.web.port}"]; + }; + metric_relabel_configs = lib.singleton { + source_labels = ["__name__"]; + regex = "node_.*"; + action = "drop"; + }; + } ]; }; diff --git a/sys/machines/hopper/lab/transmission.nix b/sys/machines/hopper/lab/transmission.nix index 38da61f..538c84e 100644 --- a/sys/machines/hopper/lab/transmission.nix +++ b/sys/machines/hopper/lab/transmission.nix @@ -19,11 +19,13 @@ speed-limit-up = 100 * mbit; speed-limit-down-enabled = true; speed-limit-down = 150 * mbit; - rpc-authentication-required = true; peer-port = 11936; + rpc-authentication-required = false; rpc-bind-address = "0.0.0.0"; - rpc-whitelist = "127.0.0.1,192.168.\*.\*"; + rpc-host-whitelist = "transmission.hopper.xun.host"; + rpc-whitelist-enabled = true; + rpc-whitelist = "127.0.0.1,192.168.\*.\*,100.\*.\*.\*"; }; - credentialsFile = config.sops.secrets.transmission.path; + # credentialsFile = config.sops.secrets.transmission.path; }; } diff --git a/sys/machines/hopper/lab/vpn-namespace.nix b/sys/machines/hopper/lab/vpn-namespace.nix index d8e2a39..354fcd1 100644 --- a/sys/machines/hopper/lab/vpn-namespace.nix +++ b/sys/machines/hopper/lab/vpn-namespace.nix @@ -57,8 +57,8 @@ 80 # caddy 443 # caddy 2019 # caddy admin, for prometheus metrics - 1900 # jellyfin discovery - 7359 # jellyfin discovery + config.services.transmission.settings.rpc-port + config.services.slskd.settings.web.port ]; in (lib.map (x: { from = x;