This commit is contained in:
Kopatz
2024-07-12 19:31:43 +02:00
parent 0e5969324c
commit f508c5f5d9
5 changed files with 26 additions and 2 deletions

View File

@@ -6,6 +6,7 @@
./opensnitch.nix
./adguard.nix
./dnsmasq.nix
./games
./gitolite.nix
./ente.nix
./kubernetes.nix

View File

@@ -1,6 +1,6 @@
{ pkgs, config, ...}:
{
imports = [
./terraria.nix
];
}

View File

@@ -0,0 +1,22 @@
{ 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;
};
};
}