summaryrefslogtreecommitdiff
path: root/hosts/toaster/network/zw.nix
diff options
context:
space:
mode:
authorGrisha Shipunov2025-08-15 18:34:37 +0200
committerGrisha Shipunov2025-08-15 18:35:18 +0200
commitf35599a59a080f0e7a173e21cae3d51dc230a212 (patch)
tree1b1b9f91f754b24602d6649df80d002cbb6d11f2 /hosts/toaster/network/zw.nix
parent963dbeb3685326d1420aadd6345db1902e8fc1f2 (diff)
Revert "retire toaster"
This reverts commit 1baa256be04a8b4e711a7d48a76197b5ffad6637.
Diffstat (limited to 'hosts/toaster/network/zw.nix')
-rw-r--r--hosts/toaster/network/zw.nix61
1 files changed, 61 insertions, 0 deletions
diff --git a/hosts/toaster/network/zw.nix b/hosts/toaster/network/zw.nix
new file mode 100644
index 0000000..71e75be
--- /dev/null
+++ b/hosts/toaster/network/zw.nix
@@ -0,0 +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;
+ }
+ ];
+ };
+ 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;
+ }
+
+ ];
+ };
+ };
+}