Files
agentos/mkosi.extra/usr/lib/systemd/system-preset/50-agent.preset
T
Job79andClaude Opus 5.5 c80e843cb5 feat: ParticleOS-like layout: /usr image, encrypted btrfs root
The image now holds only the ESP and a verity-protected /usr (A/B). At
first boot, systemd-repart in the initrd makes the root filesystem: btrfs,
encrypted with a TPM key sealed to the signed PCR 11 policy, with /var as
its own subvolume. A TPM is required. systemd.image_policy= accepts only
an encrypted root and a verity-checked /usr, and FactoryReset=yes lets
factory-reset.target wipe it.

/etc is writable but nearly empty: mkosi.finalize keeps the build's /etc
in /usr/share/factory/etc and systemd-tmpfiles links it in at boot. That
removes etc-shadow.mount, the host key on /var, fstab and /var/lib/agent.
/var now survives reboots.

systemd-firstboot replaces agent-setup: it asks for the root password on
the screen and offers a recovery key. Machines are named agent-???? from
the kernel command line. The user is now agent, with its home in
/home/agent and ssh keys in the default places. sshd.path starts sshd
only once root or agent has a key.

The test VM needs swtpm. The package cache moves to a podman volume
(AGENTS.md). No existing VMs can update to this layout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 21:09:31 +01:00

21 lines
758 B
Plaintext

# Enabled services
#
# mkosi runs systemctl preset-all, which applies this file. It sorts before
# Fedora's presets, so it wins where they disagree.
enable systemd-networkd.service
enable systemd-resolved.service
# sshd.path starts sshd once there is an ssh key, so Fedora's preset of
# sshd.service is overruled.
enable sshd.path
disable sshd.service
# getty@.service is the login on the screen, which Fedora disables (tty1, and
# tty2-6 through its autovt@ alias).
enable getty@.service
enable claude-remote.path
enable systemd-sysupdate-update.timer
enable systemd-sysupdate-reboot.timer
# authselect-apply-changes would rewrite /etc/authselect, which links into the
# read-only /usr (mkosi.finalize), and fails.
disable authselect-apply-changes.service