Files
nix-config/modules/services/games/terraria.nix
2025-10-30 21:59:31 +01:00

29 lines
536 B
Nix

{
config,
pkgs,
lib,
inputs,
...
}:
let
cfg = config.custom.services.terraria;
in
{
options.custom.services.terraria = {
enable = lib.mkEnableOption "Enables terraria server";
path = lib.mkOption {
type = with lib.types; string;
default = "/data/servers/terraria";
description = "Base path for terraria server";
};
};
config = lib.mkIf cfg.enable {
services.terraria = {
enable = true;
openFirewall = true;
password = "seas";
dataDir = cfg.path;
};
};
}