agent-setup takes its answers from the credentials agent.password, agent.hostname and agent.ssh-key when they are given, so a test VM boots without typing. The README is shorter, explains the mkosi layout and shows how to boot a test VM with these credentials. Also uploads the manifest in the os workflow and ignores the test VM files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
26 lines
658 B
Desktop File
26 lines
658 B
Desktop File
# First-boot setup
|
|
#
|
|
# Runs /usr/libexec/agent-setup on the screen (tty1) and the serial console
|
|
# (ttyS0) at once, so it can be answered on either. Whichever is answered first
|
|
# stops the other.
|
|
[Unit]
|
|
Description=Agent first-boot setup on %I
|
|
ConditionPathExists=!/var/lib/agent/hostname
|
|
After=systemd-tmpfiles-setup.service
|
|
Before=getty@%i.service serial-getty@%i.service
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
ImportCredential=agent.*
|
|
ExecStart=/usr/libexec/agent-setup
|
|
StandardInput=tty
|
|
StandardOutput=tty
|
|
TTYPath=/dev/%I
|
|
TTYReset=yes
|
|
TTYVHangup=yes
|
|
# Being stopped by the other console is not a failure.
|
|
SuccessExitStatus=SIGTERM
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|