nixos-module/container/wireguard: make upBandwidth optional

This commit is contained in:
Astro 2022-09-18 00:07:10 +02:00
parent 5fc24d2d59
commit 1293ab0a75
2 changed files with 24 additions and 1 deletions

23
config/net/flpk.nix Normal file
View File

@ -0,0 +1,23 @@
{
site.hosts = {
flpk-gw = {
interfaces = {
core = {
hwaddr = "0A:14:48:b7:e4:91";
type = "veth";
};
up-flpk = {
type = "wireguard";
upstream = {
provider = "flpk";
};
};
};
ospf = {
allowedUpstreams = [ "upstream3" "upstream4" "freifunk" ];
# upstreamInstance = TODO;
};
role = "container";
};
};
}

View File

@ -88,7 +88,7 @@ in
routeConfig.Destination = "::/0";
} ];
extraConfig = ''
extraConfig = lib.mkIf (upstream.upBandwidth != null) ''
[CAKE]
Parent = root
# DOCSIS overhead