43 lines
1.1 KiB
Nix
43 lines
1.1 KiB
Nix
|
|
{ lib, ...}:
|
||
|
|
let
|
||
|
|
{inherit lib;} mkEnableOption mkOption;
|
||
|
|
in {
|
||
|
|
options = {
|
||
|
|
services.openarena = {
|
||
|
|
enable = mkEnableOption "OpenArena game servers";
|
||
|
|
|
||
|
|
instances = mkOption {
|
||
|
|
type = types.listOf (types.submodule {
|
||
|
|
options = {
|
||
|
|
name = mkOption {
|
||
|
|
type = types.str;
|
||
|
|
description = "Unique name for this server instance";
|
||
|
|
};
|
||
|
|
port = mkOption {
|
||
|
|
type = types.int;
|
||
|
|
default = 27960;
|
||
|
|
description = "UDP port for the server";
|
||
|
|
};
|
||
|
|
gameMode = mkOption {
|
||
|
|
type = types.str;
|
||
|
|
default = "oa_dm1";
|
||
|
|
description = "Default map or game mode to start";
|
||
|
|
};
|
||
|
|
extraFlags = mkOption {
|
||
|
|
type = types.listOf types.str;
|
||
|
|
default = [ ];
|
||
|
|
description = "Extra flags to pass to oa_ded";
|
||
|
|
};
|
||
|
|
openPorts = mkOption {
|
||
|
|
type = types.bool;
|
||
|
|
default = false;
|
||
|
|
description = "Whether to open firewall ports for this instance";
|
||
|
|
};
|
||
|
|
};
|
||
|
|
}));
|
||
|
|
};
|
||
|
|
};
|
||
|
|
};
|
||
|
|
|
||
|
|
}
|