From 1293ab0a7566d42944b5b5a8d6f0b1977281abb8 Mon Sep 17 00:00:00 2001 From: Astro Date: Sun, 18 Sep 2022 00:07:10 +0200 Subject: [PATCH] nixos-module/container/wireguard: make upBandwidth optional --- config/net/flpk.nix | 23 +++++++++++++++++++++++ nix/nixos-module/container/wireguard.nix | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 config/net/flpk.nix diff --git a/config/net/flpk.nix b/config/net/flpk.nix new file mode 100644 index 000000000..0cdbf53 --- /dev/null +++ b/config/net/flpk.nix @@ -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"; + }; + }; +} diff --git a/nix/nixos-module/container/wireguard.nix b/nix/nixos-module/container/wireguard.nix index 814e9d4..122fe7d 100644 --- a/nix/nixos-module/container/wireguard.nix +++ b/nix/nixos-module/container/wireguard.nix @@ -88,7 +88,7 @@ in routeConfig.Destination = "::/0"; } ]; - extraConfig = '' + extraConfig = lib.mkIf (upstream.upBandwidth != null) '' [CAKE] Parent = root # DOCSIS overhead