fix: move unsafeRoutes to module default, genesis overrides to []
buildbot/nix-eval Build done.
buildbot/nix-build gitea:greg/nixos#checks.x86_64-linux.nixos-genesis Build done.
buildbot/nix-build gitea:greg/nixos#checks.x86_64-linux.nixos-exodus Build done.
buildbot/nix-build gitea:greg/nixos#checks.x86_64-linux.nixos-hosea Build done.
buildbot/nix-build gitea:greg/nixos#checks.x86_64-linux.nixos-isaiah Build done.
buildbot/nix-build gitea:greg/nixos#checks.x86_64-linux.nixos-jeremiah Build done.
buildbot/nix-build gitea:greg/nixos#checks.x86_64-linux.nixos-linode Build done.
buildbot/nix-build gitea:greg/nixos#checks.x86_64-linux.nixos-zeke Build done.
buildbot/nix-build Build done.

Per review feedback:
- nebula module now defaults unsafeRoutes to [{route=10.42.0.0/16 via=10.157.0.2}]
  so all regular nodes get home LAN routing automatically
- genesis overrides unsafeRoutes=[] since it IS the routing node (avoids loop)
- exodus and all k3s nodes (hosea, isaiah, jeremiah, zeke) simplified to
  nebula.enable = true only, relying on the new default
This commit is contained in:
root
2026-04-01 16:45:59 -05:00
parent 559155d411
commit 84e4c68f0e
7 changed files with 20 additions and 44 deletions
-6
View File
@@ -32,12 +32,6 @@
gnome.enable = true; gnome.enable = true;
nebula = { nebula = {
enable = true; enable = true;
unsafeRoutes = [
{
route = "10.42.0.0/16";
via = "10.157.0.2"; # genesis
}
];
}; };
podman.enable = true; podman.enable = true;
print.enable = true; print.enable = true;
+3
View File
@@ -37,6 +37,9 @@ in
gnome.enable = false; gnome.enable = false;
nebula = { nebula = {
enable = true; enable = true;
# genesis IS the routing node for the home LAN — it does not route through itself.
# Override the module default (which points at genesis) to avoid a routing loop.
unsafeRoutes = [ ];
# genesis routes the home LAN (10.42.0.0/16) into the Nebula overlay. # genesis routes the home LAN (10.42.0.0/16) into the Nebula overlay.
# Sign genesis's cert with -subnets '10.42.0.0/16' (see secrets/nebula/README.md). # Sign genesis's cert with -subnets '10.42.0.0/16' (see secrets/nebula/README.md).
routesSubnet = "10.42.0.0/16"; routesSubnet = "10.42.0.0/16";
+1 -9
View File
@@ -49,15 +49,7 @@ in
greg = { greg = {
home = true; home = true;
nebula = { nebula.enable = true;
enable = true;
unsafeRoutes = [
{
route = "10.42.0.0/16";
via = "10.157.0.2"; # genesis
}
];
};
proxies = { proxies = {
"jellyfin.home".target = "http://localhost:8096/"; "jellyfin.home".target = "http://localhost:8096/";
"jellyfin.thehellings.lan".target = "http://localhost:8096/"; "jellyfin.thehellings.lan".target = "http://localhost:8096/";
+1 -9
View File
@@ -42,15 +42,7 @@
vip = metadata.hosts.${config.networking.hostName}.ip; vip = metadata.hosts.${config.networking.hostName}.ip;
priority = 255; priority = 255;
}; };
nebula = { nebula.enable = true;
enable = true;
unsafeRoutes = [
{
route = "10.42.0.0/16";
via = "10.157.0.2"; # genesis
}
];
};
podman.enable = true; podman.enable = true;
tailscale = { tailscale = {
enable = true; enable = true;
+1 -9
View File
@@ -85,15 +85,7 @@ in
vip = ip; vip = ip;
priority = 254; priority = 254;
}; };
nebula = { nebula.enable = true;
enable = true;
unsafeRoutes = [
{
route = "10.42.0.0/16";
via = "10.157.0.2"; # genesis
}
];
};
tailscale = { tailscale = {
enable = true; enable = true;
tags = [ "home" ]; tags = [ "home" ];
+1 -9
View File
@@ -26,15 +26,7 @@
vipInterface = "enp12s0"; vipInterface = "enp12s0";
priority = 253; priority = 253;
}; };
nebula = { nebula.enable = true;
enable = true;
unsafeRoutes = [
{
route = "10.42.0.0/16";
via = "10.157.0.2"; # genesis
}
];
};
remote-builder.enable = true; remote-builder.enable = true;
runner = { runner = {
enable = true; enable = true;
+13 -2
View File
@@ -94,8 +94,19 @@ in
}; };
} }
); );
default = [ ]; # Default: route the home LAN through genesis (the home router node).
description = "List of unsafe_routes to configure on this host (for reaching non-Nebula subnets)"; # Hosts that ARE genesis (or any other routing node) should override this to [].
default = [
{
route = "10.42.0.0/16";
via = "10.157.0.2"; # genesis's Nebula IP
}
];
description = ''
List of unsafe_routes to configure on this host (for reaching non-Nebula subnets).
Defaults to routing the home LAN (10.42.0.0/16) through genesis (10.157.0.2).
Override to [] on hosts that are themselves a routing node (e.g. genesis).
'';
}; };
# Whether this host IS the router for an unsafe subnet # Whether this host IS the router for an unsafe subnet