Merge branch 'release/v0.2.8'

This commit is contained in:
Henri Bourcereau 2026-05-20 10:45:47 +02:00
commit c61ea4ae67
2 changed files with 19 additions and 21 deletions

View file

@ -66,7 +66,7 @@
"hold": "Tenir",
"opp_scored_pts": "Adversaire +{{ n }} pts",
"opp_hole_made": "Trou adverse ! {{ holes }}/12",
"hint_move": "Cliquez un champ surligné pour déplacer",
"hint_move": "Cliquez une flêche soulignée pour déplacer",
"hint_hold_or_go": "Tenir pour garder les points — S'en aller pour repartir",
"hint_continue": "Cliquez Continuer quand vous êtes prêt",
"anonymous_name": "Anonyme",
@ -95,7 +95,7 @@
"verify_email_checking": "Vérification en cours…",
"verify_email_success": "Votre email a été vérifié.",
"verify_email_invalid": "Ce lien de vérification est invalide ou a expiré.",
"email_not_verified_banner": "Veuillez vérifier votre adresse email — consultez votre boîte de réception.",
"email_not_verified_banner": "Un mail de vérification a été envoyé à votre adresse email — veuillez consulter votre boîte de réception.",
"resend_verification": "Renvoyer l'email de vérification",
"verification_email_resent": "Email de vérification envoyé.",
"loading": "Chargement…",

View file

@ -130,7 +130,8 @@ in
forceSSL = withSSL;
# Explicit listen so this vhost isn't shadowed by a default_server
# created by other virtual hosts with forceSSL = true.
listen = if withSSL then [
listen =
if withSSL then [
{ addr = "0.0.0.0"; port = 443; ssl = true; }
{ addr = "[::]"; port = 443; ssl = true; }
] else [
@ -175,13 +176,13 @@ in
install -m 644 ${pkgs.trictrac}/GameConfig.json "$STATE_DIRECTORY/GameConfig.json"
fi
'';
smtpEnvScript = if cfg.smtp.passwordFile != null then
pkgs.writeShellScript "trictrac-smtp-env" ''
set -euo pipefail
printf 'SMTP_PASS=%s\n' "$(< ${cfg.smtp.passwordFile})" > /run/trictrac/smtp.env
chmod 400 /run/trictrac/smtp.env
startScript = pkgs.writeShellScript "trictrac-start" (
optionalString (cfg.smtp.passwordFile != null) ''
export SMTP_PASS="$(< ${cfg.smtp.passwordFile})"
'' + ''
exec ${pkgs.trictrac}/bin/relay-server
''
else null;
);
in
{
description = "trictrac relay server";
@ -208,12 +209,9 @@ in
# systemd creates /var/lib/trictrac and sets STATE_DIRECTORY accordingly
StateDirectory = "trictrac";
StateDirectoryMode = "0755";
# systemd creates /run/trictrac for the smtp.env file
RuntimeDirectory = "trictrac";
WorkingDirectory = "/var/lib/trictrac";
ExecStartPre = [ "${setupScript}" ] ++ optional (smtpEnvScript != null) "+${smtpEnvScript}";
ExecStart = "${pkgs.trictrac}/bin/relay-server";
EnvironmentFile = mkIf (cfg.smtp.passwordFile != null) "/run/trictrac/smtp.env";
ExecStartPre = "${setupScript}";
ExecStart = "${startScript}";
Restart = "on-failure";
RestartSec = "5s";
};