{ config, ... }:
{
  networking.firewall = {
    allowedUDPPorts = [ 51820 ];
  };

  networking.wireguard.interfaces = {
    "${config.ips.wgInt}" = {
      # Define IP of client in per device config
      listenPort = 51820;
      privateKey = config.secrets.wgClientPriv;
      peers = [
        {
          publicKey = config.secrets.wgServerPub;
          allowedIPs = [ "${config.ips.wgSpan}.0/24" ];
          endpoint = "sv.${config.secrets.jimDomain}:51820";
          persistentKeepalive = 25;
        }
      ];
    };
  };
}