{ config, pkgs, lib, ... }: { environment.systemPackages = [ pkgs.wireguard pkgs.mosh ]; networking.nat = { enable = true; externalInterface = "ens3"; internalInterfaces = [ "wg0" ]; }; networking.firewall = { allowedUDPPorts = [ 60990 ]; }; networking.wireguard.interfaces.wg0 = { ips = [ "10.0.69.1/24" ]; listenPort = 60990; privateKeyFile = "/var/lib/wireguard/priv"; peers = [{ # bowl publicKey = "EzvDUmHXo95S2jKRv/LkH5ItUNOBgM7aQQsaq1WfCRw="; allowedIPs = [ "10.0.69.2/32" ]; } { # line publicKey = "ViRabGV2Mv0SZUVWnoAUhIzaHEvqRXAZJLq3Bp1oN1k="; allowedIPs = [ "10.0.69.3/32" ]; } ]; }; }