Skip to main content

max / alloy

Bake fw12's name and fw13's key into its mint, so a reinstall comes up reachable
Author: Max Johnson <me@maxj.phd> · 2026-09-03 17:27 UTC
Signed with PGP, not checked
Commit: 44be4ec212c422fd8db34afe18f7822eacbcc63b
Parent: 8ae66bd
2 files changed, +43 insertions, -4 deletions
@@ -20,6 +20,13 @@
20 20 # so is trailing whitespace. Quotes are not stripped, because no dial takes a
21 21 # value that needs them.
22 22 #
23 + # A value of the form @path reads the file instead. That exists for
24 + # ALLOY_SSH_KEY: a machine that is reinstalled repeatedly should not need its
25 + # key pasted in at each mint, and the recipe is committed to a public repo, so
26 + # it names where the key lives rather than carrying it. ~ is expanded; a
27 + # missing file is an error, since a medium minted with no key silently becomes
28 + # one that needs somebody at the keyboard.
29 + #
23 30 # Every key must name an ARG the Containerfile declares. That is checked here,
24 31 # against the Containerfile itself rather than a list kept in step by hand,
25 32 # because a typo'd key is silently dropped by podman and would mint exactly the
@@ -61,6 +68,21 @@
61 68 esac
62 69 key="${line%%=*}"
63 70 value="${line#*=}"
71 + case "$value" in
72 + @*)
73 + local path="${value#@}"
74 + case "$path" in "~/"*) path="$HOME/${path#\~/}" ;; esac
75 + [ -f "$path" ] || {
76 + printf 'error: %s: %s reads %s, which does not exist\n' "$file" "$key" "$path" >&2
77 + return 1
78 + }
79 + value="$(tr -d '\r\n' < "$path")"
80 + [ -n "$value" ] || {
81 + printf 'error: %s: %s reads %s, which is empty\n' "$file" "$key" "$path" >&2
82 + return 1
83 + }
84 + ;;
85 + esac
64 86 if [ "$key" = "ARCH" ]; then
65 87 HOST_ARCH="$value"
66 88 continue
@@ -1,7 +1,24 @@
1 1 # fw12 — Framework 12, Intel, second daily driver.
2 2 #
3 - # Deliberately a stock client mint. fw12 builds nothing and carries no service,
4 - # so it is the machine that proves the image an ordinary person would install,
5 - # and every dial it sets is a way that proof stops being about that image.
3 + # Deliberately a stock client mint: no PROFILE, no LANGS, no DB. fw12 builds
4 + # nothing and carries no service, so it is the machine that proves the image an
5 + # ordinary person would install, and every dial it sets is a way that proof
6 + # stops being about that image.
6 7 #
7 - # Nothing here overrides a default. The file exists so that stays a decision.
8 + # What it does set is identity, and only because the alternative is a chore.
9 + # fw12 gets reinstalled every time the image moves far enough to be worth
10 + # re-proving, and a machine that needs a person at the keyboard to become
11 + # reachable afterwards is how the last round of hardware verification turned
12 + # into eighteen tasks nobody could run.
13 +
14 + # avahi publishes fw12.local and NetworkManager sends the same name in DHCP
15 + # option 12, so the machine is reachable by name from fw13 the moment it boots.
16 + # The installer's default hostname follows this, so an install nobody retypes
17 + # still lands on the right name.
18 + ALLOY_HOSTNAME=fw12
19 +
20 + # fw13's public key, read at mint time rather than committed: this repo is
21 + # public, and a key pasted into it would also go stale silently. The installer
22 + # seeds its account step from the baked key, so a reinstalled fw12 comes up
23 + # with fw13 already able to log in, with nothing typed at the machine.
24 + ALLOY_SSH_KEY=@~/.ssh/id_ed25519.pub