Files
nix-config/modules/services/games/terraria.nix
2024-07-12 19:31:43 +02:00

23 lines
526 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;
};
};
}