aboutsummaryrefslogtreecommitdiff
path: root/nixos/modules/wireguad.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/modules/wireguad.nix')
-rw-r--r--nixos/modules/wireguad.nix33
1 files changed, 31 insertions, 2 deletions
diff --git a/nixos/modules/wireguad.nix b/nixos/modules/wireguad.nix
index d96fc9e..ca28818 100644
--- a/nixos/modules/wireguad.nix
+++ b/nixos/modules/wireguad.nix
@@ -81,18 +81,47 @@ in {
IPForward = is_endpoint;
};
routes =
- (optional (hostName != "spt-omnia") {
+ (optional (hostName != "lipwig") {
+ # OpenVPN network
+ routeConfig = {
+ Gateway = config.cynerd.hosts.wg.lipwig;
+ Destination = "10.8.0.0/24";
+ Metric = 2048;
+ };
+ })
+ ++ (optional (hostName != "spt-omnia") {
+ # SPT network
routeConfig = {
Gateway = config.cynerd.hosts.wg.spt-omnia;
Destination = "10.8.2.0/24";
+ Metric = 2048;
};
})
++ (optional (hostName != "adm-omnia" && hostName != "lipwig") {
+ # Adamkovi network
routeConfig = {
Gateway = config.cynerd.hosts.wg.adm-omnia;
Destination = "10.8.3.0/24";
+ Metric = 2048;
};
- });
+ })
+ ++ (optionals (hostName != "dean") [
+ # Elektroline
+ {
+ routeConfig = {
+ Gateway = config.cynerd.hosts.wg.dean;
+ Destination = "10.0.0.0/22";
+ Metric = 2048;
+ };
+ }
+ {
+ routeConfig = {
+ Gateway = config.cynerd.hosts.wg.dean;
+ Destination = "10.0.20.0/24";
+ Metric = 2048;
+ };
+ }
+ ]);
};
};
networking.firewall.allowedUDPPorts = [51820];