From 010a5cfb97322b1cee26c117bbf5c7ea70f6bd55 Mon Sep 17 00:00:00 2001 From: Astro Date: Sat, 10 Apr 2021 14:44:44 +0200 Subject: [PATCH] lib/config/options: make isRouter depend on having an ipv4 address in core prevents server2 from becoming a router --- nix/lib/config/options.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nix/lib/config/options.nix b/nix/lib/config/options.nix index 7ef6f47..8ace91b 100644 --- a/nix/lib/config/options.nix +++ b/nix/lib/config/options.nix @@ -155,7 +155,11 @@ let }; isRouter = mkOption { type = types.bool; - default = config.site.hosts.${name}.interfaces ? core; + # isRouter = Part of the core network? + default = + config.site.hosts.${name}.interfaces ? core && + config.site.net.core.hosts4 ? name; + description = "Should this host route?"; }; forwardPorts = mkOption { type = with types; listOf (submodule { options = {