aboutsummaryrefslogtreecommitdiff
path: root/modules/games/default.nix
blob: 952f69ac183a8a3e7f40c7104357df33a0f49fcc (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
39
40
41
42
43
44
45
46
47
48
49
{ config, lib, pkgs, ... }:

{
  imports = [ ./palworld.nix ./acc.nix ];

  services.factorio = {
    enable = true;
    package = pkgs.unstable.factorio-headless;

    public = false;
    nonBlockingSaving = true;
    loadLatestSave = true;
    game-name = "cocaine.farm";
    bind = "178.63.224.10";
  };

  services.xonotic = {
    enable = true;
    settings = {
      net_address = "178.63.224.10";
      hostname = "cocaine.farm xonotic $g_xonoticversion";
    };
  };

  services.minecraft-server = {
    enable = true;
    package = pkgs.unstable.papermc;
    eula = true;

    declarative = true;
    whitelist = import ./minecraft_whitelist.nix;
    jvmOpts = "-Xmx6144M -Xms6144M";
    serverProperties = {
      motd = "Fun for the whole family!";

      server-ip = "178.63.224.11";
      server-port = 25565;

      enforce-secure-profile = false;
      difficulty = "hard";
      enable-rcon = true;
      "rcon.password" = builtins.readFile ../../secrets/rcon;
      force-gamemode = true;
      white-list = true;
      level-type = "default";
      spawn-protection = 0;
    };
  };
}