Commit 69fbad5537af

Vincent Demeester <vincent@sbr.pm>
2025-06-16 10:19:15
systems/kerkouane: fix wireguard setup
I am not binding wireguard to the correct port… Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent b52dcea
Changed files (2)
modules/wireguard-server.nix
@@ -44,7 +44,7 @@ in
     networking.wireguard.interfaces = {
       "wg0" = {
         inherit (cfg) ips peers;
-        listenPort = 12345;
+        listenPort = 51820;
         privateKeyFile = "/etc/wireguard/private.key";
       };
     };
globals.nix
@@ -422,10 +422,10 @@ in
     /**
          Return a list of wireguard ips from a list of ips.
 
-         Essentially, it will append /24 to the each element of the list.
+         Essentially, it will append /32 to the each element of the list.
       *
     */
-    wg-ips = ips: builtins.map (x: "${x}/24") ips;
+    wg-ips = ips: builtins.map (x: "${x}/32") ips;
 
     # # keysFor = user: ;
     # hasSSHAttr = _name: value: builtins.hasAttr "ssh" value;