aboutsummaryrefslogtreecommitdiff
path: root/modules/teamspeak/default.nix
blob: 310eb1355c01006a7c8c1126a5294a9c46e4a748 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{ config, lib, pkgs, ... }:

{
  services.teamspeak3 =
    let
      ip = "178.63.224.12"; in
    {
      enable = true;
      openFirewall = true;
      voiceIP = ip;
      queryIP = ip;
      fileTransferIP = ip;
    };

  systemd.services.teamspeak3-server = {
    serviceConfig = {
      Restart = lib.mkForce "always";
    };
  };

  virtualisation.oci-containers.containers = {
    teamspeak6-server = {
      image = "teamspeaksystems/teamspeak6-server:latest";
      autoStart = true;
      ports = [
    	"178.63.224.13:9987:9987/udp"    # Default voice port
      	"178.63.224.13:30033:30033/tcp"  # File transfer port
      ];
      environment = {
        TSSERVER_LICENSE_ACCEPTED="accept";
        TSSERVER_DEFAULT_PORT="9987";
        TSSERVER_VOICE_IP="0.0.0.0";
        TSSERVER_FILE_TRANSFER_PORT="30033";
        TSSERVER_FILE_TRANSFER_IP="0.0.0.0";
      };
    };
  };
}