make BGP dummy interface addresses configurable
This commit is contained in:
@@ -79,6 +79,13 @@ in {
|
||||
description = "List of IPv6 subnets to advertise via BGP";
|
||||
};
|
||||
|
||||
extraAddresses = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [];
|
||||
example = [ "2001:db8:0:ff::1/128" ];
|
||||
description = "List of IP addresses to bind to the dummy interface for shared WireGuard endpoint or other HA services";
|
||||
};
|
||||
|
||||
routeMap = mkOption {
|
||||
type = types.enum [ "primary" "secondary" ];
|
||||
description = "BGP route map type (primary/secondary for HA)";
|
||||
@@ -140,7 +147,7 @@ in {
|
||||
|
||||
systemd.network.networks."20-shared-dummy" = mkIf cfg.bgp.enable {
|
||||
matchConfig.Name = "shared0";
|
||||
address = [ "2600:3c08:e002:6cff::1/128" ];
|
||||
address = cfg.bgp.extraAddresses;
|
||||
};
|
||||
|
||||
boot.kernel.sysctl = {
|
||||
|
||||
Reference in New Issue
Block a user