diff options
author | Karel Kočí <cynerd@email.cz> | 2024-04-01 12:14:45 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2024-04-01 12:14:45 +0200 |
commit | a9738a94e009610163e3c49e9686c12051917af7 (patch) | |
tree | b5ec298b6b9892ee59bca9d116646d78a7ea29be /nixos/modules/wireguad.nix | |
parent | e84e6dcf117080eaf7658b25fb20a9dc3b5d1cfe (diff) | |
download | nixos-personal-a9738a94e009610163e3c49e9686c12051917af7.tar.gz nixos-personal-a9738a94e009610163e3c49e9686c12051917af7.tar.bz2 nixos-personal-a9738a94e009610163e3c49e9686c12051917af7.zip |
nixos: few more fixes
Diffstat (limited to 'nixos/modules/wireguad.nix')
-rw-r--r-- | nixos/modules/wireguad.nix | 33 |
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]; |