From 38d3c984ba15f866fc8f34f12490e2c84b08910c Mon Sep 17 00:00:00 2001 From: Dmitriy Kholkin Date: Sun, 4 Aug 2024 13:57:46 +0300 Subject: [PATCH] change local ip subnet --- flake.nix | 4 +- machines/AMD-Workstation/default.nix | 6 +-- machines/Flakes-ISO/default.nix | 2 +- machines/Home-Hypervisor/backups.nix | 2 +- machines/Home-Hypervisor/default.nix | 6 +-- machines/Home-Hypervisor/dns-mapping.nix | 62 ++++++++++++------------ machines/NixOS-VPS/dns-mapping.nix | 62 ++++++++++++------------ modules/rustic-postgresql.nix | 2 +- modules/s3-sync.nix | 2 +- profiles/servers/blocky.nix | 6 +-- profiles/servers/media-stack/default.nix | 2 +- profiles/servers/metrics/default.nix | 2 +- profiles/servers/nginx.nix | 2 +- profiles/servers/tg-bot.nix | 2 +- profiles/servers/tinyproxy.nix | 8 +-- 15 files changed, 85 insertions(+), 85 deletions(-) diff --git a/flake.nix b/flake.nix index 869de79..4b88f2b 100644 --- a/flake.nix +++ b/flake.nix @@ -225,8 +225,8 @@ }; } // conf; in builtins.mapAttrs mkDeploy { - Home-Hypervisor = { hostname = "192.168.0.10"; }; - Dell-Laptop = { hostname = "192.168.0.101"; }; + Home-Hypervisor = { hostname = "10.10.10.10"; }; + Dell-Laptop = { hostname = "10.10.10.101"; }; NixOS-VPS = { hostname = "45.135.180.193"; }; } ); diff --git a/machines/AMD-Workstation/default.nix b/machines/AMD-Workstation/default.nix index 320f2d2..a850f55 100644 --- a/machines/AMD-Workstation/default.nix +++ b/machines/AMD-Workstation/default.nix @@ -104,13 +104,13 @@ services.ratbagd.enable = true; # Networking networking.firewall.allowedTCPPorts = [ 8000 5900 52736 3456 ]; - networking.nameservers = [ "192.168.0.1" ]; - networking.defaultGateway = "192.168.0.1"; + networking.nameservers = [ "10.10.10.1" ]; + networking.defaultGateway = "10.10.10.1"; networking.bridges.br0.interfaces = [ "enp9s0" ]; networking.interfaces.br0 = { useDHCP = false; ipv4.addresses = [{ - address = "192.168.0.100"; + address = "10.10.10.100"; prefixLength = 24; }]; }; diff --git a/machines/Flakes-ISO/default.nix b/machines/Flakes-ISO/default.nix index e605deb..7433b38 100644 --- a/machines/Flakes-ISO/default.nix +++ b/machines/Flakes-ISO/default.nix @@ -14,7 +14,7 @@ programs.ssh.extraConfig = '' Host nix-builder - hostname 192.168.0.100 + hostname 10.10.10.100 user ataraxia identitiesOnly yes identityFile /home/nixos/ssh-builder diff --git a/machines/Home-Hypervisor/backups.nix b/machines/Home-Hypervisor/backups.nix index 9003d2e..34c19ec 100644 --- a/machines/Home-Hypervisor/backups.nix +++ b/machines/Home-Hypervisor/backups.nix @@ -9,7 +9,7 @@ prune = false; initialize = false; environmentFile = config.sops.secrets.rustic-backups-s3-env.path; - extraEnvironment = { https_proxy = "http://192.168.0.6:8888"; }; + extraEnvironment = { https_proxy = "http://10.10.10.6:8888"; }; pruneOpts = [ "--repack-cacheable-only=false" ]; timerConfig = { OnCalendar = "05:00"; diff --git a/machines/Home-Hypervisor/default.nix b/machines/Home-Hypervisor/default.nix index 35b9ba1..482f492 100644 --- a/machines/Home-Hypervisor/default.nix +++ b/machines/Home-Hypervisor/default.nix @@ -140,13 +140,13 @@ in { networking.networkmanager.enable = false; networking.hostName = config.device; - networking.nameservers = [ "192.168.0.5" "192.168.0.1" "9.9.9.9" ]; - networking.defaultGateway = "192.168.0.1"; + networking.nameservers = [ "10.10.10.53" "10.10.10.1" "9.9.9.9" ]; + networking.defaultGateway = "10.10.10.1"; networking.bridges.br0.interfaces = [ "enp2s0f0" ]; networking.interfaces.br0 = { useDHCP = false; ipv4.addresses = [{ - address = "192.168.0.10"; + address = "10.10.10.10"; prefixLength = 24; }]; }; diff --git a/machines/Home-Hypervisor/dns-mapping.nix b/machines/Home-Hypervisor/dns-mapping.nix index 3b95b8d..8134a0e 100644 --- a/machines/Home-Hypervisor/dns-mapping.nix +++ b/machines/Home-Hypervisor/dns-mapping.nix @@ -68,37 +68,37 @@ ]; dnsmasq-list = [ # TODO: Fix dns resolution in blocky for unmapped subdomains of ataraxiadev.com - "/element.ataraxiadev.com/192.168.0.10" - "/matrix.ataraxiadev.com/192.168.0.10" - "/turn.ataraxiadev.com/192.168.0.10" + "/element.ataraxiadev.com/10.10.10.10" + "/matrix.ataraxiadev.com/10.10.10.10" + "/turn.ataraxiadev.com/10.10.10.10" - "/api.ataraxiadev.com/192.168.0.10" - "/auth.ataraxiadev.com/192.168.0.10" - "/cache.ataraxiadev.com/192.168.0.10" - "/cal.ataraxiadev.com/192.168.0.10" - "/code.ataraxiadev.com/192.168.0.10" - "/docs.ataraxiadev.com/192.168.0.10" - "/file.ataraxiadev.com/192.168.0.10" - "/home.ataraxiadev.com/192.168.0.10" - "/jackett.ataraxiadev.com/192.168.0.10" - "/jellyfin.ataraxiadev.com/192.168.0.10" - "/joplin.ataraxiadev.com/192.168.0.10" - "/kavita.ataraxiadev.com/192.168.0.10" - "/ldap.ataraxiadev.com/192.168.0.10" - "/lib.ataraxiadev.com/192.168.0.10" - "/medusa.ataraxiadev.com/192.168.0.10" - "/net.ataraxiadev.com/192.168.0.10" - "/openbooks.ataraxiadev.com/192.168.0.10" - "/pdf.ataraxiadev.com/192.168.0.10" - "/qbit.ataraxiadev.com/192.168.0.10" - "/radarr.ataraxiadev.com/192.168.0.10" - "/restic.ataraxiadev.com/192.168.0.10" - "/s3.ataraxiadev.com/192.168.0.10" - "/stats.ataraxiadev.com/192.168.0.10" - "/sonarr.ataraxiadev.com/192.168.0.10" - "/tools.ataraxiadev.com/192.168.0.10" - "/vault.ataraxiadev.com/192.168.0.10" - "/vw.ataraxiadev.com/192.168.0.10" - "/wiki.ataraxiadev.com/192.168.0.10" + "/api.ataraxiadev.com/10.10.10.10" + "/auth.ataraxiadev.com/10.10.10.10" + "/cache.ataraxiadev.com/10.10.10.10" + "/cal.ataraxiadev.com/10.10.10.10" + "/code.ataraxiadev.com/10.10.10.10" + "/docs.ataraxiadev.com/10.10.10.10" + "/file.ataraxiadev.com/10.10.10.10" + "/home.ataraxiadev.com/10.10.10.10" + "/jackett.ataraxiadev.com/10.10.10.10" + "/jellyfin.ataraxiadev.com/10.10.10.10" + "/joplin.ataraxiadev.com/10.10.10.10" + "/kavita.ataraxiadev.com/10.10.10.10" + "/ldap.ataraxiadev.com/10.10.10.10" + "/lib.ataraxiadev.com/10.10.10.10" + "/medusa.ataraxiadev.com/10.10.10.10" + "/net.ataraxiadev.com/10.10.10.10" + "/openbooks.ataraxiadev.com/10.10.10.10" + "/pdf.ataraxiadev.com/10.10.10.10" + "/qbit.ataraxiadev.com/10.10.10.10" + "/radarr.ataraxiadev.com/10.10.10.10" + "/restic.ataraxiadev.com/10.10.10.10" + "/s3.ataraxiadev.com/10.10.10.10" + "/stats.ataraxiadev.com/10.10.10.10" + "/sonarr.ataraxiadev.com/10.10.10.10" + "/tools.ataraxiadev.com/10.10.10.10" + "/vault.ataraxiadev.com/10.10.10.10" + "/vw.ataraxiadev.com/10.10.10.10" + "/wiki.ataraxiadev.com/10.10.10.10" ]; } \ No newline at end of file diff --git a/machines/NixOS-VPS/dns-mapping.nix b/machines/NixOS-VPS/dns-mapping.nix index c9ae7a0..f3b7285 100644 --- a/machines/NixOS-VPS/dns-mapping.nix +++ b/machines/NixOS-VPS/dns-mapping.nix @@ -68,37 +68,37 @@ ]; dnsmasq-list = [ # TODO: Fix dns resolution in blocky for unmapped subdomains of ataraxiadev.com - "/element.ataraxiadev.com/192.168.0.100" - "/matrix.ataraxiadev.com/192.168.0.100" - "/turn.ataraxiadev.com/192.168.0.100" + "/element.ataraxiadev.com/10.10.10.100" + "/matrix.ataraxiadev.com/10.10.10.100" + "/turn.ataraxiadev.com/10.10.10.100" - "/api.ataraxiadev.com/192.168.0.100" - # "/auth.ataraxiadev.com/192.168.0.100" - "/cache.ataraxiadev.com/192.168.0.100" - # "/cal.ataraxiadev.com/192.168.0.100" - "/code.ataraxiadev.com/192.168.0.100" - "/docs.ataraxiadev.com/192.168.0.100" - "/file.ataraxiadev.com/192.168.0.100" - "/home.ataraxiadev.com/192.168.0.100" - "/jackett.ataraxiadev.com/192.168.0.100" - "/jellyfin.ataraxiadev.com/192.168.0.100" - "/joplin.ataraxiadev.com/192.168.0.100" - "/kavita.ataraxiadev.com/192.168.0.100" - "/ldap.ataraxiadev.com/192.168.0.100" - "/lib.ataraxiadev.com/192.168.0.100" - "/medusa.ataraxiadev.com/192.168.0.100" - "/net.ataraxiadev.com/192.168.0.100" - "/openbooks.ataraxiadev.com/192.168.0.100" - "/pdf.ataraxiadev.com/192.168.0.100" - "/qbit.ataraxiadev.com/192.168.0.100" - "/radarr.ataraxiadev.com/192.168.0.100" - "/restic.ataraxiadev.com/192.168.0.100" - "/s3.ataraxiadev.com/192.168.0.100" - "/stats.ataraxiadev.com/192.168.0.100" - "/sonarr.ataraxiadev.com/192.168.0.100" - "/tools.ataraxiadev.com/192.168.0.100" - "/vault.ataraxiadev.com/192.168.0.100" - # "/vw.ataraxiadev.com/192.168.0.100" - "/wiki.ataraxiadev.com/192.168.0.100" + "/api.ataraxiadev.com/10.10.10.100" + # "/auth.ataraxiadev.com/10.10.10.100" + "/cache.ataraxiadev.com/10.10.10.100" + # "/cal.ataraxiadev.com/10.10.10.100" + "/code.ataraxiadev.com/10.10.10.100" + "/docs.ataraxiadev.com/10.10.10.100" + "/file.ataraxiadev.com/10.10.10.100" + "/home.ataraxiadev.com/10.10.10.100" + "/jackett.ataraxiadev.com/10.10.10.100" + "/jellyfin.ataraxiadev.com/10.10.10.100" + "/joplin.ataraxiadev.com/10.10.10.100" + "/kavita.ataraxiadev.com/10.10.10.100" + "/ldap.ataraxiadev.com/10.10.10.100" + "/lib.ataraxiadev.com/10.10.10.100" + "/medusa.ataraxiadev.com/10.10.10.100" + "/net.ataraxiadev.com/10.10.10.100" + "/openbooks.ataraxiadev.com/10.10.10.100" + "/pdf.ataraxiadev.com/10.10.10.100" + "/qbit.ataraxiadev.com/10.10.10.100" + "/radarr.ataraxiadev.com/10.10.10.100" + "/restic.ataraxiadev.com/10.10.10.100" + "/s3.ataraxiadev.com/10.10.10.100" + "/stats.ataraxiadev.com/10.10.10.100" + "/sonarr.ataraxiadev.com/10.10.10.100" + "/tools.ataraxiadev.com/10.10.10.100" + "/vault.ataraxiadev.com/10.10.10.100" + # "/vw.ataraxiadev.com/10.10.10.100" + "/wiki.ataraxiadev.com/10.10.10.100" ]; } \ No newline at end of file diff --git a/modules/rustic-postgresql.nix b/modules/rustic-postgresql.nix index 347d1e6..fc790fe 100644 --- a/modules/rustic-postgresql.nix +++ b/modules/rustic-postgresql.nix @@ -13,7 +13,7 @@ with lib; }; proxyAddress = mkOption { type = with types; nullOr str; - default = "http://192.168.0.6:8888"; + default = "http://10.10.10.6:8888"; }; }; })); diff --git a/modules/s3-sync.nix b/modules/s3-sync.nix index 1d19c81..c8da177 100644 --- a/modules/s3-sync.nix +++ b/modules/s3-sync.nix @@ -58,7 +58,7 @@ in { }; proxyAddress = mkOption { type = with types; nullOr str; - default = "http://192.168.0.6:8888"; + default = "http://10.10.10.6:8888"; }; }; })); diff --git a/profiles/servers/blocky.nix b/profiles/servers/blocky.nix index 9c86dcf..212b449 100644 --- a/profiles/servers/blocky.nix +++ b/profiles/servers/blocky.nix @@ -1,6 +1,6 @@ { dnsmasq-list ? [] }: { ... }: let - nodeAddress = "192.168.0.5"; + nodeAddress = "10.10.10.53"; upstream-dns = "100.64.0.1"; in { services.headscale-auth.blocky = { @@ -23,7 +23,7 @@ in { blockyHttpPort = config.services.blocky.settings.ports.http; in { networking = { - defaultGateway = "192.168.0.1"; + defaultGateway = "10.10.10.1"; hostName = "blocky-node"; nameservers = [ "127.0.0.1" ]; enableIPv6 = false; @@ -34,7 +34,7 @@ in { allowedUDPPorts = [ blockyPort ]; }; hosts = { - "192.168.0.10" = [ "wg.ataraxiadev.com" ]; + "10.10.10.10" = [ "wg.ataraxiadev.com" ]; }; }; # ephemeral tailscale node diff --git a/profiles/servers/media-stack/default.nix b/profiles/servers/media-stack/default.nix index 2afee68..ff16c38 100644 --- a/profiles/servers/media-stack/default.nix +++ b/profiles/servers/media-stack/default.nix @@ -6,7 +6,7 @@ let # caddy "127.0.0.1:8180:8180" ]; - pod-dns = "192.168.0.1"; + pod-dns = "10.10.10.1"; in { imports = [ ./caddy.nix diff --git a/profiles/servers/metrics/default.nix b/profiles/servers/metrics/default.nix index 3e8894d..8469bb2 100644 --- a/profiles/servers/metrics/default.nix +++ b/profiles/servers/metrics/default.nix @@ -3,7 +3,7 @@ let promStateDir = "prometheus2"; grafanaDataDir = "grafana"; prometheusUid = "d8e758af-3f6b-4891-a855-1efe6cdec658"; - blockyUrl = "192.168.0.5:4000"; + blockyUrl = "10.10.10.53:4000"; prometheusPort = 9001; grafanaPort = 9002; diff --git a/profiles/servers/nginx.nix b/profiles/servers/nginx.nix index 0493d15..8bd08ab 100644 --- a/profiles/servers/nginx.nix +++ b/profiles/servers/nginx.nix @@ -293,7 +293,7 @@ in { proxyPass = "http://127.0.0.1:${toString config.services.headscale.port}"; extraConfig = '' allow 100.64.0.0/16; - allow 192.168.0.0/24; + allow 10.10.10.0/24; deny all; ''; priority = 2; diff --git a/profiles/servers/tg-bot.nix b/profiles/servers/tg-bot.nix index 58287c5..6bae551 100644 --- a/profiles/servers/tg-bot.nix +++ b/profiles/servers/tg-bot.nix @@ -16,7 +16,7 @@ in { enableACME = false; forceSSL = true; locations."/" = { - proxyPass = "http://192.168.0.100:3456"; + proxyPass = "http://10.10.10.100:3456"; }; }; }; diff --git a/profiles/servers/tinyproxy.nix b/profiles/servers/tinyproxy.nix index 9dd7f00..ea68c34 100644 --- a/profiles/servers/tinyproxy.nix +++ b/profiles/servers/tinyproxy.nix @@ -5,12 +5,12 @@ ephemeral = true; privateNetwork = true; hostBridge = "br0"; - localAddress = "192.168.0.6/24"; + localAddress = "10.10.10.6/24"; config = { ... }: { services.privoxy = { enable = true; settings = { - listen-address = "192.168.0.6:8888"; + listen-address = "10.10.10.6:8888"; toggle = false; keep-alive-timeout = 300; default-server-timeout = 60; @@ -18,9 +18,9 @@ }; }; networking = { - defaultGateway = "192.168.0.1"; + defaultGateway = "10.10.10.1"; hostName = "tinyproxy-node"; - nameservers = [ "192.168.0.1" ]; + nameservers = [ "10.10.10.1" ]; useHostResolvConf = false; firewall = { enable = true;