From b61f566aa267bd56521e8a4c9973c4fc6a50b4dc Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Sat, 30 Nov 2024 13:35:53 -0300 Subject: [PATCH] fix(home-manager): make the openttd service use a secure socket --- specific/desktop/services/openttd.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/specific/desktop/services/openttd.nix b/specific/desktop/services/openttd.nix index 162dfca..dd7596f 100644 --- a/specific/desktop/services/openttd.nix +++ b/specific/desktop/services/openttd.nix @@ -14,8 +14,8 @@ Unit.Description = "OpenTTD Tmux server"; Service = { - ExecStart = "${pkgs.tmux}/bin/tmux new -s OpenTTD -d '${pkgs.openttd}/bin/openttd -g /home/wizardlink/.local/share/openttd/save/hyfy.sav -D'"; - ExecStop = "${pkgs.tmux}/bin/tmux kill-server"; + ExecStart = "${pkgs.tmux}/bin/tmux -S /run/user/1000/tmux-1000/openttd new -s OpenTTD -d '${pkgs.openttd}/bin/openttd -g /home/wizardlink/.local/share/openttd/save/hyfy.sav -D'"; + ExecStop = "${pkgs.tmux}/bin/tmux kill-session -t OpenTTD"; Restart = "on-failure"; Type = "forking"; }; @@ -30,7 +30,7 @@ }; Service = { - ExecStart = "${pkgs.tmux}/bin/tmux send-keys -t OpenTTD 'rcon_pw aaaa' Enter"; + ExecStart = "${pkgs.tmux}/bin/tmux -S /run/user/1000/tmux-1000/openttd send-keys -t OpenTTD 'rcon_pw aaaa' Enter"; Type = "oneshot"; }; }; @@ -44,7 +44,7 @@ }; Service = { - ExecStart = "${pkgs.tmux}/bin/tmux send-keys -t OpenTTD 'save hyfy' Enter"; + ExecStart = "${pkgs.tmux}/bin/tmux -S /run/user/1000/tmux-1000/openttd send-keys -t OpenTTD 'save hyfy' Enter"; Type = "simple"; Restart = "always"; RestartSec = "1800s";