feat(servers): make 7 Days to Die server work
All checks were successful
Discord / discord commits (push) Successful in 38s
All checks were successful
Discord / discord commits (push) Successful in 38s
This commit is contained in:
parent
4fb8fab641
commit
2a8eb46b03
5 changed files with 16 additions and 39 deletions
|
@ -1,37 +1,20 @@
|
||||||
{
|
{pkgs, ...}: let
|
||||||
pkgs,
|
gamePath = "/var/lib/steam-servers/7-days-to-die";
|
||||||
steam-servers,
|
in {
|
||||||
...
|
systemd.extraConfig = "DefaultLimitNOFILE=10240";
|
||||||
}: {
|
|
||||||
imports = [steam-servers.nixosModules.default];
|
|
||||||
|
|
||||||
services.steam-servers."7-days-to-die" = {
|
# https://github.com/Krutonium/NewNix/blob/455aafc4caf553248ca228f844f021cecf494dc2/services/sevendaystodie.nix#L6
|
||||||
mainServ = {
|
systemd.services."7daystodie" = {
|
||||||
enable = true;
|
wantedBy = ["multi-user.target"];
|
||||||
package =
|
serviceConfig.Type = "oneshot";
|
||||||
steam-servers
|
serviceConfig.User = "matt";
|
||||||
.packages
|
|
||||||
.${pkgs.system}
|
|
||||||
."7-days-to-die"
|
|
||||||
.branches
|
|
||||||
.latest_experimental;
|
|
||||||
|
|
||||||
config = {
|
path = with pkgs; [steam-run steamcmd];
|
||||||
ServerName = "bruh moment";
|
script = ''
|
||||||
ServerPort = 26900;
|
mkdir -p ${gamePath}
|
||||||
|
cd ${gamePath}
|
||||||
# removed in v1.0
|
steamcmd +force_install_dir ${gamePath} +login anonymous +app_update 294420 -beta latest_experimental +quit
|
||||||
SaveGameFolder = null;
|
steam-run ./startserver.sh -configfile=serverconfig-7days.xml
|
||||||
|
'';
|
||||||
BlockDamagePlayer = 200;
|
|
||||||
BloodMoonEnemyCount = 10;
|
|
||||||
DropOnDeath = 3;
|
|
||||||
PartySharedKillRange = 10000;
|
|
||||||
PlayerKillingMode = 2;
|
|
||||||
XPMultiplier = 200;
|
|
||||||
ZombieBMMove = 1;
|
|
||||||
ZombieMoveNight = 0;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
BIN
flake.lock
BIN
flake.lock
Binary file not shown.
BIN
flake.nix
BIN
flake.nix
Binary file not shown.
|
@ -89,11 +89,6 @@ let
|
||||||
repo = "nixos-minecraft-servers";
|
repo = "nixos-minecraft-servers";
|
||||||
};
|
};
|
||||||
|
|
||||||
steam-servers = mkDep {
|
|
||||||
owner = "matt1432";
|
|
||||||
repo = "nix-steam-servers";
|
|
||||||
};
|
|
||||||
|
|
||||||
nix-eval-jobs = mkDep {
|
nix-eval-jobs = mkDep {
|
||||||
owner = "nix-community";
|
owner = "nix-community";
|
||||||
repo = "nix-eval-jobs";
|
repo = "nix-eval-jobs";
|
||||||
|
|
1
lib.nix
1
lib.nix
|
@ -17,7 +17,6 @@
|
||||||
inputs.grim-hyprland.overlays.default
|
inputs.grim-hyprland.overlays.default
|
||||||
inputs.jovian.overlays.default
|
inputs.jovian.overlays.default
|
||||||
inputs.nixpkgs-wayland.overlays.default
|
inputs.nixpkgs-wayland.overlays.default
|
||||||
inputs.steam-servers.inputs.steam-fetcher.overlays.default
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue