From cfe0c19bf69c70ac8b2cc4b4a9b54ea72b9c4552 Mon Sep 17 00:00:00 2001 From: DerGrumpf Date: Tue, 21 Apr 2026 20:29:51 +0200 Subject: [PATCH] Added more cities to log --- nixos/roles/matrix/clients.nix | 8 +++++ nixos/roles/matrix/synapse.nix | 3 +- nixos/roles/monitoring.nix | 59 +++++++++++++++++++++++----------- 3 files changed, 50 insertions(+), 20 deletions(-) diff --git a/nixos/roles/matrix/clients.nix b/nixos/roles/matrix/clients.nix index fdcd13e..72dc43d 100644 --- a/nixos/roles/matrix/clients.nix +++ b/nixos/roles/matrix/clients.nix @@ -126,6 +126,14 @@ let custom_themes = catppuccinThemes; feature_custom_themes = true; }; + features = { + feature_group_calls = true; + }; + element_call = { + url = "https://livekit.cyperpunk.de"; + participant_limit = 8; + brand = "Element Call"; + }; } ); elementWebConfigured = pkgs.element-web.overrideAttrs (old: { diff --git a/nixos/roles/matrix/synapse.nix b/nixos/roles/matrix/synapse.nix index 1ebaa5a..470f167 100644 --- a/nixos/roles/matrix/synapse.nix +++ b/nixos/roles/matrix/synapse.nix @@ -45,7 +45,8 @@ }; extra_well_known_client_content = { "io.element.call.backend" = { - url = "https://call.element.io"; + url = "https://livekit.cyperpunk.de"; + livekit_service_url = "https://livekit.cyperpunk.de/_matrix/livekit/jwt"; }; }; listeners = [ diff --git a/nixos/roles/monitoring.nix b/nixos/roles/monitoring.nix index 6dc92d3..172735c 100644 --- a/nixos/roles/monitoring.nix +++ b/nixos/roles/monitoring.nix @@ -20,6 +20,44 @@ let "cyper-node-1" = "192.168.2.30"; "cyper-node-2" = "192.168.2.31"; }; + + mkWeatherScrapeConfigs = + cities: + map (city: { + job_name = "weather_${lib.strings.toLower (lib.strings.replaceStrings [ " " ] [ "_" ] city)}"; + scrape_interval = "5m"; + scrape_timeout = "30s"; + metrics_path = "/${city}"; + params.format = [ "p1" ]; + static_configs = [ { targets = [ "wttr.in" ]; } ]; + scheme = "https"; + metric_relabel_configs = [ + { + target_label = "location"; + replacement = city; + } + ]; + }) cities; + + weatherCities = [ + # Braunschweig itself + "Braunschweig" + + # Immediate surroundings (~15km) + "Wolfenbuettel" + "Salzgitter" + "Peine" + "Cremlingen" + "Wendeburg" + "Sickte" + + # Greater region (~50km) + "Wolfsburg" + "Gifhorn" + "Goslar" + "Hildesheim" + "Hannover" + ]; in { sops.secrets = { @@ -89,23 +127,6 @@ in ]; metrics_path = "/metrics"; } - { - job_name = "weather_braunschweig"; - scrape_interval = "5m"; # be a polite citizen to wttr.in - scrape_timeout = "30s"; - metrics_path = "/Braunschweig"; - params = { - format = [ "p1" ]; - }; - static_configs = [ { targets = [ "wttr.in" ]; } ]; - scheme = "https"; - metric_relabel_configs = [ - { - target_label = "location"; - replacement = "Braunschweig"; - } - ]; - } { job_name = "synapse"; scrape_interval = "15s"; @@ -121,9 +142,9 @@ in } ]; } - ] - ++ (lib.mapAttrsToList mkNodeJob extraNodes); + ++ (lib.mapAttrsToList mkNodeJob extraNodes) + ++ (mkWeatherScrapeConfigs weatherCities); }; loki = {