From 3a0fe99688d4e4e57fd5ec547985b8fff2d1ba66 Mon Sep 17 00:00:00 2001 From: JuliusFreudenberger Date: Thu, 21 May 2026 00:47:36 +0200 Subject: [PATCH] Add option for docker subnet for netbird webproxy network The same subnet on different routing peers makes problems for the reverse proxy feature. Therefore add the possibility to set a different subnet on different hosts. --- modules/netbird-client.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/netbird-client.nix b/modules/netbird-client.nix index 2edf19d..f6429f9 100644 --- a/modules/netbird-client.nix +++ b/modules/netbird-client.nix @@ -37,6 +37,11 @@ in { description = "Configuration for docker connection"; type = clientConfiguration; }; + dockerSubnet = lib.mkOption { + description = "Second part of ipv4 subnet"; + type = lib.types.str; + default = "20"; + }; }; config = lib.mkIf cfg.enable { @@ -94,7 +99,7 @@ in { Type = "oneshot"; }; script = '' - docker network inspect webproxy || docker network create webproxy --ipv4 --ipv6 --subnet=172.20.0.0/16 --gateway=172.20.0.1 + docker network inspect webproxy || docker network create webproxy --ipv4 --ipv6 --subnet=172.${cfg.dockerSubnet}.0.0/16 --gateway=172.${cfg.dockerSubnet}.0.1 ''; }; };