feat(home-manager): add Terraria service
This commit is contained in:
parent
7ffc647e17
commit
7442269541
|
@ -9,6 +9,7 @@
|
||||||
imports = [
|
imports = [
|
||||||
../../modules/home-manager
|
../../modules/home-manager
|
||||||
./services/openttd.nix
|
./services/openttd.nix
|
||||||
|
./services/terraria.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# Home Manager needs a bit of information about you and the paths it should
|
# Home Manager needs a bit of information about you and the paths it should
|
||||||
|
|
|
@ -54,6 +54,7 @@
|
||||||
6567 # Mindustry
|
6567 # Mindustry
|
||||||
80 # HTTP
|
80 # HTTP
|
||||||
3979 # OpenTTD
|
3979 # OpenTTD
|
||||||
|
7777 # Terraria
|
||||||
];
|
];
|
||||||
|
|
||||||
allowedUDPPorts = [
|
allowedUDPPorts = [
|
||||||
|
|
|
@ -1,19 +1,17 @@
|
||||||
{
|
{ pkgs, ... }:
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
systemd.user.services.terraria = {
|
systemd.user.services.terraria = {
|
||||||
Install.WantedBy = [ "default.target" ];
|
Install.WantedBy = [ "default.target" ];
|
||||||
|
|
||||||
Unit.Description = "Terraria Tmux Server";
|
Unit.Description = "Terraria TMUX Server";
|
||||||
|
|
||||||
Service = {
|
Service = {
|
||||||
ExecStart = "${pkgs.tmux}/bin/tmux new -s Terraria -d 'fhs -c \"dotnet ./tModLoader.dll -server -config serverconfig.txt\"'";
|
ExecStart = "${pkgs.tmux}/bin/tmux -S /run/user/1000/tmux-1000/terraria new -s Terraria -d /etc/profiles/per-user/wizardlink/bin/fhs -c 'dotnet ./tModLoader.dll -server -config serverconfig.txt'";
|
||||||
ExecStop = "${pkgs.tmux}/bin/tmux kill-server";
|
ExecStop = "${pkgs.tmux}/bin/tmux kill-session -t Terraria";
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
Type = "forking";
|
Type = "forking";
|
||||||
|
WorkingDirectory = "/mnt/ssd/SteamLibrary/steamapps/common/tModLoader";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue