server-configs/machines/gerd/services/teeworlds.nix

30 lines
844 B
Nix
Raw Normal View History

2024-08-11 12:50:32 +00:00
{ config, ... }:
{
services.teeworlds = {
enable = true;
openPorts = true;
motd = "Welcome to ${config.mine.shared.settings.domain}'s Teeworld server!";
environmentFile = config.age.secrets.teeworlds-env.path;
password = "$TEEWORLDS_PASSWORD";
};
2024-11-20 18:21:07 +00:00
mine.shared.meta.teeworlds = rec {
name = "Teeworlds";
2024-11-20 18:21:07 +00:00
description = ''We host our own Teeworlds instance. Connect using `nix-shell -p teeworlds --run 'teeworlds "connect ${url}" "password {{secrets.TEEWORLDS_PASSWORD}}"'`, the password is {{secrets.TEEWORLDS_PASSWORD}}'';
url = "teeworlds.${config.mine.shared.settings.domain}";
secrets.auth = config.age.secrets.teeworlds-env.path;
package = let
pkg = config.services.teeworlds.package;
in {
name = pkg.pname;
version = pkg.version;
meta = pkg.meta;
};
};
}