Jump to content

WireGuard: Difference between revisions

imported from old wiki
(imported from old wiki)
(imported from old wiki)
Line 314: Line 314:
           ListenPort = 9918;
           ListenPort = 9918;
         };
         };
         wireguardPeers = [
         wireguardPeers = [        
          # configuration since nixos-unstable/nixos-24.11
           {
           {
             wireguardPeerConfig = {
             PublicKey = "OhApdFoOYnKesRVpnYRqwk3pdM247j8PPVH5K7aIKX0=";
              PublicKey = "OhApdFoOYnKesRVpnYRqwk3pdM247j8PPVH5K7aIKX0=";
            AllowedIPs = ["fc00::1/64" "10.100.0.1"];
              AllowedIPs = ["fc00::1/64" "10.100.0.1"];
            Endpoint = "{set this to the server ip}:51820";
              Endpoint = "{set this to the server ip}:51820";
            };
           }
           }
          # configuration for nixos 24.05
          #{
          #  wireguardPeerConfig = {
          #    PublicKey = "OhApdFoOYnKesRVpnYRqwk3pdM247j8PPVH5K7aIKX0=";
          #    AllowedIPs = ["fc00::1/64" "10.100.0.1"];
          #    Endpoint = "{set this to the server ip}:51820";
          #  };
          #}
         ];
         ];
       };
       };