[Unit]
Description=Construct AI Hardware Agent
Documentation=https://github.com/construct/construct
After=network-online.target
Wants=network-online.target

[Service]
Type=simple
User=pi
SupplementaryGroups=gpio spi i2c
WorkingDirectory=/home/pi/construct
ExecStart=/home/pi/construct/construct gateway --host 0.0.0.0 --port 8080
Restart=on-failure
RestartSec=5
EnvironmentFile=/home/pi/construct/.env
Environment=RUST_LOG=info

# Expand ~ in config path
Environment=HOME=/home/pi

[Install]
WantedBy=multi-user.target
