From c4edd6575fbb3b63b155da4b757338e21c97a774 Mon Sep 17 00:00:00 2001 From: LRFLEW Date: Wed, 4 Feb 2026 22:32:43 -0600 Subject: [PATCH] nixos/terraria: add package option --- nixos/modules/services/games/terraria.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/games/terraria.nix b/nixos/modules/services/games/terraria.nix index 60aa06f01b2d..b0726dd5fafe 100644 --- a/nixos/modules/services/games/terraria.nix +++ b/nixos/modules/services/games/terraria.nix @@ -64,6 +64,10 @@ in ''; }; + package = lib.mkPackageOption pkgs "terraria" { + default = "terraria-server"; + }; + port = lib.mkOption { type = lib.types.port; default = 7777; @@ -178,7 +182,7 @@ in Type = "forking"; GuessMainPID = true; UMask = 7; - ExecStart = "${tmuxCmd} new -d ${pkgs.terraria-server}/bin/TerrariaServer ${lib.concatStringsSep " " flags}"; + ExecStart = "${tmuxCmd} new -d ${lib.getExe cfg.package} ${lib.concatStringsSep " " flags}"; ExecStop = "${stopScript} $MAINPID"; }; };