refactor: rename to agentos, hand-picked /etc, user presets at first boot
os / os (push) Waiting to run

- Rename the image from agent to agentos (ImageId, hostname, CI, docs).
- mkosi.finalize only copies /etc to /usr/share/factory/etc. The hand-written
  tmpfiles.d/factory-etc.conf links the 24 entries the image needs.
- /etc/systemd is writable: PID 1 applies the system presets at first boot
  and preset-global.service the user presets, as in ParticleOS.
- claude-remote runs in the user manager of agent, enabled by a user preset.
- Root has no /var subvolume, and the verity partitions shrink to 16M.
- Style pass over comments, CLAUDE.md and AGENTS.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Job79andClaude Opus 5.5 committed 2026-11-22 15:48:42 +01:00
1 parent 186d133cbc
commit 1707500c05
25 files changed
+253 -249

No files matched your search

+4 -5
View File
@@ -1,7 +1,6 @@
# agent.conf makes the home of the user agent
# (mkosi.extra/usr/lib/sysusers.d/agent.conf), with Claude's login and podman
# storage.
d /home/agent 0700 agent agent -
# agent.conf makes the home of the user agent.
d /home/agent 0700 agent agent
# linger starts the user manager of agent at boot, for rootless podman and
# Claude's own services.
# claude-remote.path (mkosi.extra/usr/lib/systemd/user).
f /var/lib/systemd/linger/agent
@@ -0,0 +1,44 @@
# factory-etc.conf links what the image needs from /usr/share/factory/etc
# (mkosi.finalize) into the empty /etc at boot, so updates to /usr take effect
# in /etc too. The rest of the factory is unused package config. /etc itself
# holds what the machine writes: passwd, shadow, group, machine-id, ld.so.cache,
# /etc/systemd and the ssh host keys. systemd's own etc.conf sets up
# os-release, nsswitch.conf and pam.d.
#
# /etc/systemd is filled from the presets at first boot: by PID 1 for system
# units, and by mkosi.extra/usr/lib/systemd/system/preset-global.service for
# user units.
#
# subuid and subgid are copied, because shadow-utils won't read them through a
# link. Rootless podman needs them.
C /etc/subgid
C /etc/subuid
# /etc/ssh is a writable directory, because sshd-keygen writes the host keys
# there at first boot.
d /etc/ssh 0755
L /etc/ssh/moduli
L /etc/ssh/ssh_config
L /etc/ssh/ssh_config.d
L /etc/ssh/sshd_config
L /etc/ssh/sshd_config.d
# authselect holds the PAM files that /etc/pam.d links to.
L /etc/authselect
L /etc/security
L /etc/environment
L /etc/login.defs
L /etc/shells
# pki and ssl hold the CA certificates, and crypto-policies the TLS and ssh
# settings.
L /etc/pki
L /etc/ssl
L /etc/crypto-policies
L /etc/bashrc
L /etc/profile
L /etc/profile.d
L /etc/protocols
L /etc/services
L /etc/hostname
L /etc/claude-code