From 25f79f137d6870af1a78379d196fb951589a67b7 Mon Sep 17 00:00:00 2001 From: Mel Date: Fri, 20 Dec 2024 03:38:23 +0100 Subject: Allow access to VictoriaMetrics from tailnet Signed-off-by: Mel --- services/monitoring/default.nix | 4 ++-- services/monitoring/wrapper.nix | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'services/monitoring') diff --git a/services/monitoring/default.nix b/services/monitoring/default.nix index 60374b5..cf966fb 100644 --- a/services/monitoring/default.nix +++ b/services/monitoring/default.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, auxiliaryPkgs, ... }: +{ me, lib, pkgs, auxiliaryPkgs, ... }: let inherit (pkgs) victoriametrics grafana dockerTools; @@ -37,7 +37,7 @@ in foundation.service.monitoring = { victoria = { image = victoriaImage; - ports = [ victoriaLocalPort ]; + ports = [ (common.tailnetPort me victoriaLocalPort) ]; volumes = [ [ "${victoriaDir}" "/var/lib/victoria" ] diff --git a/services/monitoring/wrapper.nix b/services/monitoring/wrapper.nix index 416ae22..62c860b 100644 --- a/services/monitoring/wrapper.nix +++ b/services/monitoring/wrapper.nix @@ -1,6 +1,6 @@ # This wraps the monitoring service module to allow it to be # imported conditionally. -{ lib, pkgs, auxiliaryPkgs, config, ... }: +{ me, lib, pkgs, auxiliaryPkgs, config, ... }: let enabled = config.foundation.internal.monitoringService; @@ -11,5 +11,5 @@ in monitoringService = lib.mkEnableOption "monitoring service"; }; - config = lib.mkIf enabled (module { inherit lib pkgs auxiliaryPkgs; }); + config = lib.mkIf enabled (module { inherit me lib pkgs auxiliaryPkgs; }); } -- cgit 1.4.1