carlos / platform Public

Clone
git clone https://amadan.net/carlos/platform

Plain git — no account needed to clone.

Download

Download this file

1# One release-adoption pass (release.Pass): resolve channel pointers, verify
2# signatures, stage new versions under /opt/carlos/versions, repoint live
3# symlinks, cycle systemd-managed routes. Fired hourly by carlos-adopt.timer.
4# The agent also runs an in-process adopt loop, but that loop lives inside the
5# sandboxed edge unit (ProtectSystem=strict, no /opt write) — this root oneshot
6# is what actually stages on a hardened box. Shaped after Eleven's
7# deploy/systemd/lchat-update.service.
8[Unit]
9Description=carlos adopt (one release-adoption pass)
10After=network-online.target
11Wants=network-online.target
12
13[Service]
14Type=oneshot
15# CARLOS_DEPLOYMENT_BUCKET/_DIR + CARLOS_RELEASE_PUBKEY live here.
16EnvironmentFile=-/etc/carlos/host.env
17ExecStart=/opt/carlos/carlos adopt
18
19# --- hardening ---
20# Runs as ROOT deliberately (like Eleven's updater): a pass writes the version
21# store (/opt/carlos) and restarts instance units via systemctl. NoNewPrivileges
22# and the syscall filter are omitted for the systemctl child; the rest applies.
23ProtectHome=yes
24PrivateTmp=yes
25PrivateDevices=yes
26ProtectClock=yes
27ProtectHostname=yes
28ProtectKernelTunables=yes
29ProtectKernelModules=yes
30ProtectKernelLogs=yes
31RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
32RestrictNamespaces=yes
33RestrictRealtime=yes
34LockPersonality=yes
35MemoryDenyWriteExecute=yes
36MemoryMax=256M
37TasksMax=64
38