change local ip subnet

This commit is contained in:
Dmitriy Kholkin 2024-08-04 13:57:46 +03:00
parent e297a9567d
commit 38d3c984ba
Signed by: AtaraxiaDev
GPG Key ID: FD266B810DF48DF2
15 changed files with 85 additions and 85 deletions

View File

@ -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"; };
}
);

View File

@ -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;
}];
};

View File

@ -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

View File

@ -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";

View File

@ -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;
}];
};

View File

@ -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"
];
}

View File

@ -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"
];
}

View File

@ -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";
};
};
}));

View File

@ -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";
};
};
}));

View File

@ -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

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -16,7 +16,7 @@ in {
enableACME = false;
forceSSL = true;
locations."/" = {
proxyPass = "http://192.168.0.100:3456";
proxyPass = "http://10.10.10.100:3456";
};
};
};

View File

@ -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;