[Unit]
Description=Hermes Agent Gateway
After=network-online.target
Wants=network-online.target

[Service]
User={{ hermes_user }}
Group={{ hermes_user }}
SupplementaryGroups=systemd-journal

Environment=HOME={{ hermes_home }}
Environment=HERMES_HOME={{ hermes_data_dir }}
Environment=LM_BASE_URL={{ hermes_lm_base_url }}
Environment=LM_API_KEY={{ hermes_lm_api_key }}
Environment=PATH={{ hermes_data_dir }}/hermes-agent/venv/bin:/usr/local/bin:/usr/bin:/bin

ExecStart={{ hermes_home }}/.local/bin/hermes gateway run --replace

Restart=on-failure
RestartSec=10s

StandardOutput=journal
StandardError=journal
SyslogIdentifier=hermes-agent

[Install]
WantedBy=multi-user.target
