carlos / platform Public

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

Plain git — no account needed to clone.

Download

Download this file

1# Root's half of joining (region HA spec 2 §5 step 5.3): `carlos system
2# join` verifies this box's signed invitation, writes the enrollment it
3# names, and arms the host lifecycle guard (guard-arm) with the release
4# identity `carlos system install-channel` kept. On a box that is armed
5# already, has no invitation yet, or has CARLOS_HOST_CLAIM or
6# CARLOS_REGION_HA off, it does nothing. Started only by
7# carlos-system-join.path; no [Install] section, because nothing else
8# should want it.
9#
10# Root, with no filesystem sandboxing, like carlos-system-update.service:
11# guard-arm writes /opt/carlos/system/guard, /etc/carlos/host-actor.json and
12# the guarded units' drop-ins under /etc/systemd/system.
13# StartLimitIntervalSec=0 because the path unit can fire in bursts.
14[Unit]
15Description=carlos joining (root: arm the host lifecycle guard)
16After=network-online.target
17Wants=network-online.target
18StartLimitIntervalSec=0
19
20[Service]
21Type=oneshot
22TimeoutStartSec=5min
23EnvironmentFile=-/etc/carlos/host.env
24ExecStart=/opt/carlos/carlos system join
25
26# --- hardening (the carlos-system-update.service set) ---
27ProtectHome=yes
28PrivateTmp=yes
29PrivateDevices=yes
30ProtectClock=yes
31ProtectHostname=yes
32ProtectKernelTunables=yes
33ProtectKernelModules=yes
34ProtectKernelLogs=yes
35RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
36RestrictNamespaces=yes
37RestrictRealtime=yes
38LockPersonality=yes
39MemoryDenyWriteExecute=yes
40MemoryMax=256M
41TasksMax=64
42