diff options
| author | Grisha Shipunov | 2025-01-11 03:55:19 +0100 |
|---|---|---|
| committer | Grisha Shipunov | 2025-01-11 03:55:19 +0100 |
| commit | 62e2519639faa250f43f9e80e69906a59d07a44e (patch) | |
| tree | 08d662d7674904d566d2dd7ccf85affb9ddd7cd9 /hosts/toaster/network/zw.nix | |
| parent | 595d4935de99cc2ff10be9eaddac498c7c38489f (diff) | |
delete legacy stuff and reformat
Diffstat (limited to 'hosts/toaster/network/zw.nix')
| -rw-r--r-- | hosts/toaster/network/zw.nix | 107 |
1 files changed, 56 insertions, 51 deletions
diff --git a/hosts/toaster/network/zw.nix b/hosts/toaster/network/zw.nix index af961be..71e75be 100644 --- a/hosts/toaster/network/zw.nix +++ b/hosts/toaster/network/zw.nix @@ -1,56 +1,61 @@ -{ config, ... }: { - # zentralwerk - systemd.network = { - netdevs."10-wg-zentralwerk" = { - netdevConfig = { - Kind = "wireguard"; - Name = "wg-zentralwerk"; - Description = "Tunnel to the best basement in Dresden"; - }; - wireguardConfig = { - PrivateKeyFile = config.sops.secrets."wg/zw".path; - RouteTable = "off"; - }; - wireguardPeers = [ - { - PublicKey = "PG2VD0EB+Oi+U5/uVMUdO5MFzn59fAck6hz8GUyLMRo="; - Endpoint = "81.201.149.152:1337"; - AllowedIPs = [ "172.20.72.0/21" "172.22.90.0/24" "172.22.99.0/24" ]; - PersistentKeepalive = 25; - } - ]; +{ config, ... }: +{ + # zentralwerk + systemd.network = { + netdevs."10-wg-zentralwerk" = { + netdevConfig = { + Kind = "wireguard"; + Name = "wg-zentralwerk"; + Description = "Tunnel to the best basement in Dresden"; + }; + wireguardConfig = { + PrivateKeyFile = config.sops.secrets."wg/zw".path; + RouteTable = "off"; }; - networks."10-wg-zentralwerk" = { - matchConfig.Name = "wg-zentralwerk"; - networkConfig = { - Address = "172.20.76.226/21"; - IPv6AcceptRA = true; - DNS = "172.20.73.8"; - Domains = [ - "~hq.c3d2.de" - "~serv.zentralwerk.org" - "~hq.zentralwerk.org" - "~cluster.zentralwerk.org" + wireguardPeers = [ + { + PublicKey = "PG2VD0EB+Oi+U5/uVMUdO5MFzn59fAck6hz8GUyLMRo="; + Endpoint = "81.201.149.152:1337"; + AllowedIPs = [ + "172.20.72.0/21" + "172.22.90.0/24" + "172.22.99.0/24" ]; - }; - routes = [ - { - Gateway = "172.20.76.225"; - Destination = "172.20.72.0/21"; - Metric = 1023; - } - { - Gateway = "172.20.76.225"; - Destination = "172.20.90.0/24"; - Metric = 1023; - } - { - Gateway = "172.20.76.225"; - Destination = "172.22.99.0/24"; - Metric = 1023; - } - + PersistentKeepalive = 25; + } + ]; + }; + networks."10-wg-zentralwerk" = { + matchConfig.Name = "wg-zentralwerk"; + networkConfig = { + Address = "172.20.76.226/21"; + IPv6AcceptRA = true; + DNS = "172.20.73.8"; + Domains = [ + "~hq.c3d2.de" + "~serv.zentralwerk.org" + "~hq.zentralwerk.org" + "~cluster.zentralwerk.org" ]; }; + routes = [ + { + Gateway = "172.20.76.225"; + Destination = "172.20.72.0/21"; + Metric = 1023; + } + { + Gateway = "172.20.76.225"; + Destination = "172.20.90.0/24"; + Metric = 1023; + } + { + Gateway = "172.20.76.225"; + Destination = "172.22.99.0/24"; + Metric = 1023; + } + + ]; }; - } + }; +} |
