[Unit]
Description=SOLLOL GPU Reporter Service
After=network.target redis.service ollama.service
Documentation=https://github.com/BenevolentJoker-JohnL/SOLLOL
Wants=redis.service ollama.service

[Service]
Type=simple
User=%u
WorkingDirectory=%h/SOLLOL
ExecStart=/usr/bin/env python3 %h/SOLLOL/gpu_reporter.py --redis-host %REDIS_HOST% --redis-port %REDIS_PORT% --node-id %NODE_ID% --interval %REPORT_INTERVAL%
Restart=always
RestartSec=10
StandardOutput=journal
StandardError=journal

# These will be replaced by the installer
# Override in ~/.config/systemd/user/sollol-gpu-reporter.service.d/override.conf if needed
Environment="REDIS_HOST=%REDIS_HOST%"
Environment="REDIS_PORT=%REDIS_PORT%"
Environment="NODE_ID=%NODE_ID%"
Environment="REPORT_INTERVAL=5"

[Install]
WantedBy=default.target
