From e46c6bef00ba346d265254446ddbd3bd49348e90 Mon Sep 17 00:00:00 2001 From: kalipso Date: Fri, 20 Feb 2026 19:59:27 +0100 Subject: [PATCH] [general] update local vm ip addresses --- machines/durruti/configuration.nix | 1 - machines/fanny/configuration.nix | 17 +++++++++-------- machines/infradocs/configuration.nix | 1 - machines/modules/malobeo/metrics.nix | 3 ++- machines/nextcloud/configuration.nix | 8 +++++--- machines/overwatch/configuration.nix | 14 ++++++++------ machines/overwatch/dashboards/node_full.json | 4 ++-- machines/overwatch/promtail.yaml | 2 +- machines/zineshop/configuration.nix | 1 - 9 files changed, 27 insertions(+), 24 deletions(-) diff --git a/machines/durruti/configuration.nix b/machines/durruti/configuration.nix index e86456a..f0573d0 100644 --- a/machines/durruti/configuration.nix +++ b/machines/durruti/configuration.nix @@ -29,7 +29,6 @@ with lib; enable = true; enablePromtail = true; logNginx = true; - lokiHost = "10.0.0.14"; }; services.malobeo-tasklist.enable = true; diff --git a/machines/fanny/configuration.nix b/machines/fanny/configuration.nix index b010e69..befaee0 100644 --- a/machines/fanny/configuration.nix +++ b/machines/fanny/configuration.nix @@ -2,6 +2,7 @@ let sshKeys = import ../ssh_keys.nix; peers = import ../modules/malobeo/peers.nix; + hosts = import ../hosts.nix {}; in { sops.defaultSopsFile = ./secrets.yaml; @@ -35,7 +36,7 @@ in enable = true; enablePromtail = true; logNginx = true; - lokiHost = "10.0.0.14"; + lokiHost = hosts.malobeo.hosts.overwatch.network.address; }; malobeo.autoUpdate = { @@ -169,7 +170,7 @@ in enable = true; virtualHosts."docs.malobeo.org" = { locations."/" = { - proxyPass = "http://10.0.0.11:9000"; + proxyPass = "http://${hosts.malobeo.hosts.infradocs.network.address}:9000"; extraConfig = '' proxy_set_header Host $host; ''; @@ -181,7 +182,7 @@ in enableACME = true; acmeRoot = null; locations."/" = { - proxyPass = "http://192.168.1.13"; + proxyPass = "http://${hosts.malobeo.hosts.nextcloud.network.address}"; extraConfig = '' proxy_set_header Host $host; client_max_body_size ${inputs.self.nixosConfigurations.nextcloud.config.services.nextcloud.maxUploadSize}; @@ -196,7 +197,7 @@ in forceSSL = true; enableACME = true; locations."/" = { - proxyPass = "http://192.168.1.13"; + proxyPass = "http://${hosts.malobeo.hosts.nextcloud.network.address}"; extraConfig = '' proxy_set_header Host $host; client_max_body_size ${inputs.self.nixosConfigurations.nextcloud.config.services.nextcloud.maxUploadSize}; @@ -209,7 +210,7 @@ in virtualHosts."grafana.malobeo.org" = { locations."/" = { - proxyPass = "http://10.0.0.14"; + proxyPass = "http://${hosts.malobeo.hosts.overwatch.network.address}"; extraConfig = '' proxy_set_header Host $host; ''; @@ -218,7 +219,7 @@ in virtualHosts."tasklist.malobeo.org" = { locations."/" = { - proxyPass = "http://10.0.0.5:8080"; + proxyPass = "http://${hosts.malobeo.hosts.durruti.network.address}:8080"; extraConfig = '' proxy_set_header Host $host; ''; @@ -230,7 +231,7 @@ in enableACME = true; acmeRoot = null; locations."/" = { - proxyPass = "http://192.168.1.15:8080"; + proxyPass = "http://${hosts.malobeo.hosts.zineshop.network.address}:8080"; extraConfig = '' proxy_set_header Host $host; @@ -249,7 +250,7 @@ in forceSSL = true; enableACME = true; locations."/" = { - proxyPass = "http://192.168.1.15:8080"; + proxyPass = "http://${hosts.malobeo.hosts.zineshop.network.address}:8080"; extraConfig = '' proxy_set_header Host $host; diff --git a/machines/infradocs/configuration.nix b/machines/infradocs/configuration.nix index d1cc2fa..7064a96 100644 --- a/machines/infradocs/configuration.nix +++ b/machines/infradocs/configuration.nix @@ -19,7 +19,6 @@ with lib; enable = true; enablePromtail = true; logNginx = true; - lokiHost = "10.0.0.14"; }; system.stateVersion = "22.11"; # Did you read the comment? diff --git a/machines/modules/malobeo/metrics.nix b/machines/modules/malobeo/metrics.nix index c5f320b..9c74b10 100644 --- a/machines/modules/malobeo/metrics.nix +++ b/machines/modules/malobeo/metrics.nix @@ -1,6 +1,7 @@ { config, lib, pkgs, ... }: let cfg = config.malobeo.metrics; + hosts = import ../../hosts.nix {}; in { options.malobeo.metrics = { @@ -21,7 +22,7 @@ in }; lokiHost = lib.mkOption { type = lib.types.str; - default = "10.0.0.14"; + default = hosts.malobeo.hosts.overwatch.network.address; description = "Address of loki host"; }; }; diff --git a/machines/nextcloud/configuration.nix b/machines/nextcloud/configuration.nix index baccf2a..c63682f 100644 --- a/machines/nextcloud/configuration.nix +++ b/machines/nextcloud/configuration.nix @@ -2,6 +2,9 @@ with lib; +let + hosts = import ../hosts.nix {}; +in { sops.defaultSopsFile = ./secrets.yaml; sops.secrets = { @@ -28,7 +31,6 @@ with lib; enable = true; enablePromtail = true; logNginx = true; - lokiHost = "10.0.0.14"; }; services.postgresqlBackup = { @@ -59,8 +61,8 @@ with lib; }; }; settings = { - trusted_domains = ["10.0.0.13"]; - trusted_proxies = [ "10.0.0.1" ]; + trusted_domains = [ "cloud.malobeo.org" ]; + trusted_proxies = [ hosts.malobeo.hosts.fanny.network.address ]; "maintenance_window_start" = "1"; "default_phone_region" = "DE"; }; diff --git a/machines/overwatch/configuration.nix b/machines/overwatch/configuration.nix index d6ece49..5beaca3 100644 --- a/machines/overwatch/configuration.nix +++ b/machines/overwatch/configuration.nix @@ -2,6 +2,9 @@ with lib; +let + hosts = import ../hosts.nix {}; +in { networking = { hostName = mkDefault "overwatch"; @@ -21,7 +24,6 @@ with lib; enable = true; enablePromtail = true; logNginx = false; - lokiHost = "10.0.0.14"; }; services.grafana = { @@ -101,31 +103,31 @@ with lib; { job_name = "durruti"; static_configs = [{ - targets = [ "10.0.0.5:9002" ]; + targets = [ "${hosts.malobeo.hosts.durruti.network.address}:9002" ]; }]; } { job_name = "infradocs"; static_configs = [{ - targets = [ "10.0.0.11:9002" ]; + targets = [ "${hosts.malobeo.hosts.infradocs.network.address}:9002" ]; }]; } { job_name = "nextcloud"; static_configs = [{ - targets = [ "10.0.0.13:9002" ]; + targets = [ "${hosts.malobeo.hosts.nextcloud.network.address}:9002" ]; }]; } { job_name = "zineshop"; static_configs = [{ - targets = [ "10.0.0.15:9002" ]; + targets = [ "${hosts.malobeo.hosts.zineshop.network.address}:9002" ]; }]; } { job_name = "fanny"; static_configs = [{ - targets = [ "10.0.0.1:9002" ]; + targets = [ "${hosts.malobeo.hosts.fanny.network.address}:9002" ]; }]; } # add vpn - check how to reach it first. most probably 10.100.0.1 diff --git a/machines/overwatch/dashboards/node_full.json b/machines/overwatch/dashboards/node_full.json index 7f19c9f..75776f6 100644 --- a/machines/overwatch/dashboards/node_full.json +++ b/machines/overwatch/dashboards/node_full.json @@ -23750,8 +23750,8 @@ }, { "current": { - "text": "10.0.0.13:9002", - "value": "10.0.0.13:9002" + "text": "192.168.1.13:9002", + "value": "192.168.1.13:9002" }, "datasource": { "type": "prometheus", diff --git a/machines/overwatch/promtail.yaml b/machines/overwatch/promtail.yaml index 8030572..2d42cbb 100644 --- a/machines/overwatch/promtail.yaml +++ b/machines/overwatch/promtail.yaml @@ -6,7 +6,7 @@ positions: filename: /tmp/positions.yaml clients: - - url: http://10.0.0.13:3100/loki/api/v1/push + - url: http://192.168.1.13:3100/loki/api/v1/push scrape_configs: diff --git a/machines/zineshop/configuration.nix b/machines/zineshop/configuration.nix index aac419e..11bb260 100644 --- a/machines/zineshop/configuration.nix +++ b/machines/zineshop/configuration.nix @@ -20,7 +20,6 @@ with lib; enable = true; enablePromtail = true; logNginx = true; - lokiHost = "10.0.0.14"; }; services.printing.enable = true;