server-configs/machines/gerd/services/teeworlds.nix
2024-11-20 19:21:07 +01:00

29 lines
844 B
Nix

{ 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";
};
mine.shared.meta.teeworlds = rec {
name = "Teeworlds";
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;
};
};
}