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,
|
||||
steam-servers,
|
||||
...
|
||||
}: {
|
||||
imports = [steam-servers.nixosModules.default];
|
||||
{pkgs, ...}: let
|
||||
gamePath = "/var/lib/steam-servers/7-days-to-die";
|
||||
in {
|
||||
systemd.extraConfig = "DefaultLimitNOFILE=10240";
|
||||
|
||||
services.steam-servers."7-days-to-die" = {
|
||||
mainServ = {
|
||||
enable = true;
|
||||
package =
|
||||
steam-servers
|
||||
.packages
|
||||
.${pkgs.system}
|
||||
."7-days-to-die"
|
||||
.branches
|
||||
.latest_experimental;
|
||||
# https://github.com/Krutonium/NewNix/blob/455aafc4caf553248ca228f844f021cecf494dc2/services/sevendaystodie.nix#L6
|
||||
systemd.services."7daystodie" = {
|
||||
wantedBy = ["multi-user.target"];
|
||||
serviceConfig.Type = "oneshot";
|
||||
serviceConfig.User = "matt";
|
||||
|
||||
config = {
|
||||
ServerName = "bruh moment";
|
||||
ServerPort = 26900;
|
||||
|
||||
# removed in v1.0
|
||||
SaveGameFolder = null;
|
||||
|
||||
BlockDamagePlayer = 200;
|
||||
BloodMoonEnemyCount = 10;
|
||||
DropOnDeath = 3;
|
||||
PartySharedKillRange = 10000;
|
||||
PlayerKillingMode = 2;
|
||||
XPMultiplier = 200;
|
||||
ZombieBMMove = 1;
|
||||
ZombieMoveNight = 0;
|
||||
};
|
||||
};
|
||||
path = with pkgs; [steam-run steamcmd];
|
||||
script = ''
|
||||
mkdir -p ${gamePath}
|
||||
cd ${gamePath}
|
||||
steamcmd +force_install_dir ${gamePath} +login anonymous +app_update 294420 -beta latest_experimental +quit
|
||||
steam-run ./startserver.sh -configfile=serverconfig-7days.xml
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
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";
|
||||
};
|
||||
|
||||
steam-servers = mkDep {
|
||||
owner = "matt1432";
|
||||
repo = "nix-steam-servers";
|
||||
};
|
||||
|
||||
nix-eval-jobs = mkDep {
|
||||
owner = "nix-community";
|
||||
repo = "nix-eval-jobs";
|
||||
|
|
1
lib.nix
1
lib.nix
|
@ -17,7 +17,6 @@
|
|||
inputs.grim-hyprland.overlays.default
|
||||
inputs.jovian.overlays.default
|
||||
inputs.nixpkgs-wayland.overlays.default
|
||||
inputs.steam-servers.inputs.steam-fetcher.overlays.default
|
||||
];
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue