games-night/modules/openarena-instance.nix

35 lines
691 B
Nix
Raw Normal View History

2025-09-16 00:24:06 +02:00
{
config,
lib,
pkgs,
...
}:
2025-09-15 17:30:27 +02:00
let
cfg = config.services.openarena-instance;
openarenatbz2 = pkgs.fetchurl {
url = "https://johannes.dynip.online/files/cwace-openarena-server.tbz2";
sha256 = "f47c4cc5aaa7f59aa9d6ad4d76e9f4255cc8a88d9cfc2ba884bd8ab7ebf3ce00";
};
2025-09-16 00:24:06 +02:00
in
{
2025-09-15 17:30:27 +02:00
options.services.openarena-instance = {
# ... existing options ...
};
config = {
systemd.services."openarena@${cfg.name}" = {
# ... existing service config ...
preStart = ''
mkdir -p /var/lib/openarena-${cfg.name}
tar -xf ${openarenatbz2} -C /var/lib/openarena-${cfg.name} --strip-components=1
'';
};
# ... existing firewall config ...
};
2025-09-16 00:24:06 +02:00
}