5818b05d96
- Add user management and Oh My Zsh settings - Update service scripts to use Zsh - Include new packages and environment variables - Modify Terraform configuration for upstream services
30 lines
1.1 KiB
Django/Jinja
30 lines
1.1 KiB
Django/Jinja
[Unit]
|
|
Description=OpenCode - AI-powered terminal IDE
|
|
After=network.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
User={{ linux_dev_station_service_user }}
|
|
Group={{ linux_dev_station_service_user }}
|
|
WorkingDirectory={{ linux_dev_station_workspace_dir }}
|
|
ExecStart=/bin/zsh -i {{ linux_dev_station_scripts_dir }}/start-opencode.sh
|
|
Restart=always
|
|
RestartSec=5
|
|
StandardOutput=append:{{ linux_dev_station_logs_dir }}/opencode.log
|
|
StandardError=append:{{ linux_dev_station_logs_dir }}/opencode.err.log
|
|
|
|
Environment="HOME={{ linux_dev_station_service_home }}"
|
|
Environment="PATH={{ linux_dev_station_path }}"
|
|
Environment="TMPDIR={{ linux_dev_station_service_home }}/.cache/tmp"
|
|
Environment="OPENCODE_SERVER_USERNAME={{ linux_dev_station_opencode_server_username }}"
|
|
Environment="OPENCODE_SERVER_PASSWORD={{ linux_dev_station_opencode_server_password }}"
|
|
{% for env_key, env_value in linux_dev_station_opencode_extra_environment.items() %}
|
|
Environment="{{ env_key }}={{ env_value }}"
|
|
{% endfor %}
|
|
{% if linux_dev_station_ssh_agent_enabled | bool %}
|
|
Environment="SSH_AUTH_SOCK={{ linux_dev_station_ssh_agent_socket }}"
|
|
{% endif %}
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|