style: apply STYLE.md to all files

Give every file a header (title, empty line, explanation), wrap comments
at 80 columns and keep them to the why. Only comments change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Job79andClaude Opus 5.5 committed 2026-11-16 20:14:06 +01:00
1 parent efb282bf7d
commit a1fc65ed21
32 files changed
+191 -113

No files matched your search

+44 -35
View File
@@ -1,7 +1,10 @@
# agent: a Fedora VM image that runs Claude Code in the background, built with mkosi.
# mkosi.extra/ is copied to /, mkosi.repart/ defines the disk, mkosi.sandbox/ adds the Claude Code repo.
# The root filesystem, /etc included, is read-only and replaced whole by updates; all state lives
# on /var. Claude can't change the OS: it runs its tools in containers.
# Agent image
#
# A Fedora VM image that runs Claude Code in the background. mkosi.extra/ is
# copied to /, mkosi.repart/ defines the disk and mkosi.sandbox/ adds the
# Claude Code package repository. The root filesystem, /etc included, is
# read-only and replaced whole by updates. All state lives on /var. Claude
# can't change the OS, so it runs its tools in containers.
[Distribution]
Distribution=fedora
@@ -17,19 +20,18 @@ SplitArtifacts=uki,partitions
[Content]
Bootable=yes
Bootloader=systemd-boot
# - kernel-core no drivers or firmware beyond what VMs need
# - systemd-container, gnupg2 systemd-pull, which systemd-sysupdate downloads with, and gpg,
# which it checks their signature with
# - systemd-boot-unsigned the bootloader
# - util-linux, shadow-utils console login, setup, newuidmap for rootless podman
# - systemd-pam login sessions (pam_systemd): Claude's user manager and its
# D-Bus, which rootless podman needs
# - openssh-server ssh login for the user (keys only)
# - zram-generator-defaults compressed swap in RAM
# - podman, podman-docker containers, for all of Claude's toolchains (also as docker)
# - claude-code Claude Code (mkosi.sandbox/etc/yum.repos.d)
# - git-core, openssh-clients Claude Code uses git; it pushes over ssh
# - the rest basic command-line tools Claude uses on the host
# - kernel-core no drivers or firmware beyond what VMs need
# - systemd-container systemd-pull, which systemd-sysupdate downloads by
# - gnupg2 checks the signature of updates
# - util-linux, shadow-utils console login, setup, newuidmap for rootless podman
# - systemd-pam login sessions: Claude's user manager and its
# D-Bus, which rootless podman needs
# - openssh-server ssh login for the user (keys only)
# - zram-generator-defaults compressed swap in RAM
# - podman, podman-docker containers for Claude's toolchains (also as docker)
# - claude-code from mkosi.sandbox/etc/yum.repos.d
# - git-core, openssh-clients Claude Code uses git and pushes over ssh
# - the rest basic command-line tools Claude uses on the host
Packages=
kernel-core
systemd
@@ -61,13 +63,17 @@ Packages=
iproute
WithDocs=no
Locale=C.UTF-8
# The UKI's file name in the ESP, as systemd-sysupdate names the ones it installs.
# Name UKIs the way systemd-sysupdate names the ones it installs.
UnifiedKernelImageFormat=%i_%v
# The console on screen and serial port, the machine ID from the VM's firmware
# (mkosi.extra/etc/machine-id is empty, so no boot counts as the first), no systemd-firstboot
# questions (agent-setup asks its own), freeing memory unused for an hour (damon_reclaim, in µs; the
# watermarks make it run whatever memory is free), so the host can take it back (virtio-balloon
# free page reporting).
# - console= show the console on screen and on the serial port
# - systemd.machine_id= take the machine ID from the VM's firmware;
# mkosi.extra/etc/machine-id is empty, so no boot
# counts as the first
# - systemd.firstboot=no agent-setup asks its own questions
# - damon_reclaim.* free memory unused for an hour (min_age is in µs),
# so the host can take it back through virtio-balloon
# free page reporting. The watermarks make it run
# however much memory is free.
KernelCommandLine=
console=tty0
console=ttyS0,115200n8
@@ -79,7 +85,7 @@ KernelCommandLine=
damon_reclaim.wmarks_high=1000
damon_reclaim.wmarks_mid=999
damon_reclaim.wmarks_low=0
# Kernel modules in the initrd: only what finds and mounts the disks of a VM.
# The initrd only needs to find and mount the disks of a VM.
KernelInitrdModules=
virtio_blk
virtio_scsi
@@ -88,9 +94,10 @@ KernelInitrdModules=
dm-verity
erofs
ext4
# Kernel modules in the image: all but the hardware drivers, then the drivers of a VM (disks,
# network, screen) and of rootless podman's networks (pasta). The last matching line wins.
# Keyboard, USB and a basic screen are built into the kernel.
# All modules but the hardware drivers, then the drivers a VM needs (disks,
# network, screen) and those of rootless podman's networks (pasta). The last
# matching line wins. Keyboard, USB and a basic screen are built into the
# kernel.
KernelModules=
/*
-/drivers/*
@@ -106,10 +113,12 @@ KernelModules=
virtio-gpu
veth
tun
# - System.map only for debugging the kernel
# - udev hwdb hardware names and quirks, nothing a VM needs
# - homed, userdbd, nsresourced unused services
# - sshd-keygen sshd uses one host key, kept on /var (sshd_config.d)
# - System.map only for debugging the kernel
# - udev hwdb hardware names and quirks, nothing a VM needs
# - homed, userdbd, unused services
# nsresourced
# - sshd-keygen sshd uses one host key, kept on /var
# (mkosi.extra/etc/ssh/sshd_config.d)
RemoveFiles=
/usr/lib/modules/*/System.map
/usr/lib/udev/hwdb.bin
@@ -120,10 +129,10 @@ RemoveFiles=
/usr/lib/systemd/system/sshd-keygen*
[Validation]
# Signs systemd-boot and the UKI for Secure Boot, and puts our keys on the ESP, where systemd-boot
# enrolls them at first boot if the firmware is in setup mode (no keys enrolled; in Proxmox, an EFI
# disk without pre-enrolled keys). mkosi.crt is the certificate; mkosi.key, its private key, is the
# SECUREBOOT_KEY secret of this repository, which the os workflow writes to mkosi.key.
# Sign systemd-boot and the UKI for Secure Boot, and put our keys on the ESP.
# systemd-boot enrolls them at first boot if the firmware is in setup mode (no
# keys enrolled; in Proxmox, an EFI disk without pre-enrolled keys).
# mkosi.key is the SECUREBOOT_KEY secret, which .gitea/workflows/os.yml writes.
SecureBoot=yes
SecureBootKey=mkosi.key
SecureBootCertificate=mkosi.crt