- Follow AGENTS.md style: headers start with the file's name, short notes are full sentences, comments within 80 columns. - Build with mkosi's tools tree, pinned to the image's release (ToolsTreeRelease=%r): rawhide's repositories made the image rawhide. - Incremental builds with mkosi.cache/ for faster local rebuilds. - Hostname= instead of systemd.hostname= on the kernel command line. - mkosi.finalize: bash, no cd, and L+ for /etc/systemd. PID 1 applies the presets at first boot and made /etc/systemd/system, which blocked the link, so /etc/systemd/user (the user's D-Bus) was missing. - Disable homed, userdbd and nsresourced with presets instead of deleting their units. Drop modules the kernel has built in. - mkosi.version adds the git commit to the version. - One dev container per worktree or session in CLAUDE.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
26 files changed
+205
-243
No files matched your search
@@ -9,8 +9,10 @@ claude.ai/code or the Claude app (Remote Control), or log in with ssh.
|
||||
Boot verifies the UKI (kernel, initrd and command line), which holds the
|
||||
dm-verity hash that verifies `/usr`.
|
||||
- **Encrypted with a TPM:** everything that isn't read-only, such as `/etc`,
|
||||
`/var` and `/home`, is encrypted. The TPM unlocks it only for those signed
|
||||
`/var` and `/home`, is encrypted. The TPM unlocks it only for correctly signed
|
||||
UKIs.
|
||||
- **Easy to reset:** a factory reset wipes everything that isn't read-only, and
|
||||
the VM sets itself up again as at first boot.
|
||||
- **Tools in containers:** Claude runs as the user `agent`, without root, and
|
||||
runs its toolchains in containers with podman.
|
||||
- **Self-updating:** the image rebuilds weekly. A bad update rolls back by
|
||||
@@ -28,22 +30,22 @@ claude.ai/code and the Claude app under its hostname: `agent-` and four hex
|
||||
digits.
|
||||
|
||||
To start over, run `systemctl start factory-reset.target` as root. It reboots
|
||||
and wipes `/etc` and `/var`, and the VM sets itself up as at first boot.
|
||||
and wipes the root partition (`/etc`, `/var` and `/home`), and the VM sets
|
||||
itself up as at first boot.
|
||||
|
||||
## Development
|
||||
|
||||
```sh
|
||||
mkosi genkey # local test only, CI uses the SECUREBOOT_KEY secret
|
||||
mkosi genkey # This is for local tests. CI uses the SECUREBOOT_KEY secret.
|
||||
mkosi build
|
||||
```
|
||||
|
||||
`mkosi.output/` then holds the disk image (`agent_<version>.raw`) and the UKI
|
||||
and /usr partitions that make up an update.
|
||||
|
||||
To build and boot a test VM (needs `qemu-kvm-core edk2-ovmf swtpm
|
||||
openssh-clients socat`):
|
||||
To build and boot a test VM:
|
||||
|
||||
```sh
|
||||
mkosi -f vm # opens its console: log in as root, password root
|
||||
mkosi ssh # in another terminal: ssh in as root
|
||||
mkosi -f vm # This opens the console. Log in as root, password root.
|
||||
mkosi ssh # This logs in as root with ssh, in another terminal.
|
||||
```
|
||||
Reference in new issue
Block a user