From f32955a326627025ee70c73559dbc413a48bb3ce Mon Sep 17 00:00:00 2001 From: Lucy Date: Mon, 15 Sep 2025 17:30:27 +0200 Subject: [PATCH] openarena --- modules/openarena-instance.nix | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 modules/openarena-instance.nix diff --git a/modules/openarena-instance.nix b/modules/openarena-instance.nix new file mode 100644 index 0000000..209b1ea --- /dev/null +++ b/modules/openarena-instance.nix @@ -0,0 +1,28 @@ +{config, lib, pkgs, ...}: + +let + cfg = config.services.openarena-instance; + + openarenatbz2 = pkgs.fetchurl { + url = "https://johannes.dynip.online/files/cwace-openarena-server.tbz2"; + sha256 = "f47c4cc5aaa7f59aa9d6ad4d76e9f4255cc8a88d9cfc2ba884bd8ab7ebf3ce00"; + }; + +in { + 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 ... + }; +} \ No newline at end of file