- 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
+10
-10
@@ -1,8 +1,6 @@
|
|||||||
# OS image
|
# os.yml builds the OS image and publishes it as version "latest". VMs fetch
|
||||||
#
|
# the built images as updates (mkosi.extra/usr/lib/sysupdate.d). It runs on
|
||||||
# Builds the OS image and publishes it as version "latest". VMs fetch the
|
# every push, weekly for package updates, and by hand for critical CVEs.
|
||||||
# built images as updates (mkosi.extra/usr/lib/sysupdate.d). Runs on every
|
|
||||||
# push, weekly for package updates, and by hand for critical CVEs.
|
|
||||||
#
|
#
|
||||||
# Required values:
|
# Required values:
|
||||||
# - SECUREBOOT_KEY repository secret: the private key of mkosi.crt, written
|
# - SECUREBOOT_KEY repository secret: the private key of mkosi.crt, written
|
||||||
@@ -21,12 +19,9 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
os:
|
os:
|
||||||
runs-on: linux
|
runs-on: linux
|
||||||
env:
|
|
||||||
PKG: ${{ gitea.server_url }}/api/packages/${{ gitea.repository_owner }}/generic/agent/latest
|
|
||||||
AUTH: "Authorization: token ${{ gitea.token }}"
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install tools
|
- name: Install tools
|
||||||
run: dnf install -yq mkosi sbsigntools
|
run: dnf install -yq mkosi git-core
|
||||||
- name: Check out
|
- name: Check out
|
||||||
uses: builtin:checkout
|
uses: builtin:checkout
|
||||||
- name: Build
|
- name: Build
|
||||||
@@ -39,12 +34,14 @@ jobs:
|
|||||||
working-directory: mkosi.output
|
working-directory: mkosi.output
|
||||||
run: |
|
run: |
|
||||||
zstd -q --rm -9 agent_*.usr-*.raw
|
zstd -q --rm -9 agent_*.usr-*.raw
|
||||||
|
- name: Checksum
|
||||||
|
working-directory: mkosi.output
|
||||||
|
run: sha256sum agent_*.efi agent_*.usr-*.raw.zst > SHA256SUMS
|
||||||
- name: Sign
|
- name: Sign
|
||||||
working-directory: mkosi.output
|
working-directory: mkosi.output
|
||||||
env:
|
env:
|
||||||
KEY: ${{ secrets.SIGNING_KEY }}
|
KEY: ${{ secrets.SIGNING_KEY }}
|
||||||
run: |
|
run: |
|
||||||
sha256sum agent_*.efi agent_*.usr-*.raw.zst > SHA256SUMS
|
|
||||||
export GNUPGHOME=$(mktemp -d)
|
export GNUPGHOME=$(mktemp -d)
|
||||||
gpg -q --batch --import <<< "$KEY"
|
gpg -q --batch --import <<< "$KEY"
|
||||||
gpg -q --batch -o SHA256SUMS.gpg --detach-sign SHA256SUMS
|
gpg -q --batch -o SHA256SUMS.gpg --detach-sign SHA256SUMS
|
||||||
@@ -53,6 +50,9 @@ jobs:
|
|||||||
run: qemu-img convert -c -O qcow2 "$(basename agent_*.efi .efi).raw" agent.qcow2
|
run: qemu-img convert -c -O qcow2 "$(basename agent_*.efi .efi).raw" agent.qcow2
|
||||||
- name: Publish
|
- name: Publish
|
||||||
working-directory: mkosi.output
|
working-directory: mkosi.output
|
||||||
|
env:
|
||||||
|
PKG: ${{ gitea.server_url }}/api/packages/${{ gitea.repository_owner }}/generic/agent/latest
|
||||||
|
AUTH: "Authorization: token ${{ gitea.token }}"
|
||||||
run: |
|
run: |
|
||||||
curl -fsS -H "$AUTH" -X DELETE "$PKG" || true
|
curl -fsS -H "$AUTH" -X DELETE "$PKG" || true
|
||||||
for f in agent_*.efi agent_*.usr-*.raw.zst agent.qcow2 agent_*.manifest SHA256SUMS.gpg SHA256SUMS; do
|
for f in agent_*.efi agent_*.usr-*.raw.zst agent.qcow2 agent_*.manifest SHA256SUMS.gpg SHA256SUMS; do
|
||||||
|
|||||||
@@ -1,2 +1,5 @@
|
|||||||
mkosi.output/
|
mkosi.output/
|
||||||
mkosi.key
|
mkosi.key
|
||||||
|
mkosi.cache/
|
||||||
|
mkosi.tools/
|
||||||
|
mkosi.tools.*
|
||||||
@@ -5,31 +5,37 @@ every change.
|
|||||||
|
|
||||||
## Style
|
## Style
|
||||||
|
|
||||||
- Keep it simple. Prefer fewer files, fewer lines and the defaults. Delete what
|
- Keep it simple. Prefer fewer files and fewer lines. Delete what isn't
|
||||||
isn't needed.
|
needed.
|
||||||
|
- Follow the defaults and conventions of each tool and language. Only set an
|
||||||
|
option when the default doesn't work, and say why.
|
||||||
- Divide code and config into parts (files, directories, sections) that each
|
- Divide code and config into parts (files, directories, sections) that each
|
||||||
stand on their own: reading one part alone tells you what it does and why.
|
stand on their own: reading one part alone tells you what it does and why.
|
||||||
- Each fact lives in one place. Elsewhere, refer to it by path instead of
|
- Each fact lives in one place. Elsewhere, refer to it instead of repeating it.
|
||||||
repeating it.
|
|
||||||
- Write plain English in short sentences.
|
- Write plain English in short sentences.
|
||||||
|
- Name each part for what it does. A part without a good name holds things
|
||||||
|
that don't belong together.
|
||||||
|
- A little copying beats a little dependency. Repeat a small piece rather than
|
||||||
|
share it or pull it in from elsewhere.
|
||||||
|
|
||||||
### File header
|
### File header
|
||||||
|
|
||||||
Every file that allows comments starts with a header. It goes after the
|
A file starts with a header, after the shebang if there is one. Leave it out
|
||||||
shebang, if there is one:
|
when the name already says it all, as with `.gitignore`. A part made of
|
||||||
|
many files, like a package, needs it in only one of them. For example:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
# Image version
|
# mkosi.version prints the build time in UTC (YYYYMMDDhhmm) and the git
|
||||||
#
|
# commit. Every build gets a higher version than the one before, which is how
|
||||||
# Prints the build time in UTC (YYYYMMDDhhmm). Every build gets a higher
|
# systemd-sysupdate tells that an update is newer. The commit tells which
|
||||||
# version than the one before, which is how systemd-sysupdate tells that an
|
# source an image was built from.
|
||||||
# update is newer.
|
|
||||||
```
|
```
|
||||||
|
|
||||||
- Line 1 is a title: a few words, in sentence case, with no full stop.
|
- The first sentence starts with the name of the part the file is, and says
|
||||||
- Then a line with only the comment character.
|
what it does. That is the name the language or tool uses for it, such as a
|
||||||
- Then what the file does and why, naming the files it works with by path.
|
file name or a package name.
|
||||||
|
- The rest says why, naming the files it works with by path.
|
||||||
|
|
||||||
Files that can't hold comments (JSON, `subuid`, `machine-id`) are explained in
|
Files that can't hold comments (JSON, `subuid`, `machine-id`) are explained in
|
||||||
the file that uses them.
|
the file that uses them.
|
||||||
@@ -38,10 +44,13 @@ the file that uses them.
|
|||||||
|
|
||||||
- Explain why, not what. Leave out comments that only repeat the code. Try to
|
- Explain why, not what. Leave out comments that only repeat the code. Try to
|
||||||
write clean code instead of many comments.
|
write clean code instead of many comments.
|
||||||
- Put a comment right above the line or block it is about.
|
- Put a comment right above the line or block it is about. A short note on
|
||||||
|
one line may go at the end of that line, as a full sentence too.
|
||||||
- Write full sentences that start with the name of what they describe:
|
- Write full sentences that start with the name of what they describe:
|
||||||
`# ManifestFormat lists the packages and versions in the image.` or
|
`# ManifestFormat lists the packages and versions in the image.` or
|
||||||
`# link prints the tmpfiles line for /etc/$1.`
|
`# link prints the tmpfiles line for /etc/$1.`
|
||||||
|
- Separate paragraphs and lists with a line holding only the comment
|
||||||
|
character.
|
||||||
- Wrap comments at 80 columns.
|
- Wrap comments at 80 columns.
|
||||||
|
|
||||||
## Testing
|
## Testing
|
||||||
@@ -51,15 +60,13 @@ run mkosi in a privileged podman container that boots systemd:
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
podman build -t mkosi-vm - <<'END'
|
podman build -t mkosi-vm - <<'END'
|
||||||
FROM registry.fedoraproject.org/fedora:45
|
FROM registry.fedoraproject.org/fedora:latest
|
||||||
RUN dnf install -y mkosi qemu-kvm-core edk2-ovmf systemd-repart swtpm \
|
RUN dnf install -y mkosi git-core
|
||||||
openssh-clients socat && \
|
|
||||||
dnf install -y $(mkosi dependencies)
|
|
||||||
CMD ["/sbin/init"]
|
CMD ["/sbin/init"]
|
||||||
END
|
END
|
||||||
podman run -d --name mkosi --privileged --systemd=always -v <repo>:/repo \
|
podman run -d --name mkosi --privileged --systemd=always -v <repo>:/repo \
|
||||||
-v mkosi-cache:/root/.cache/mkosi -w /repo mkosi-vm
|
-v mkosi-cache:/root/.cache/mkosi -w /repo mkosi-vm
|
||||||
podman exec mkosi mkosi genkey # once, if there is no mkosi.key
|
podman exec mkosi mkosi genkey # Run this once, if there is no mkosi.key.
|
||||||
podman exec -d -t mkosi sh -c 'mkosi -f vm > mkosi.output/vm.log 2>&1'
|
podman exec -d -t mkosi sh -c 'mkosi -f vm > mkosi.output/vm.log 2>&1'
|
||||||
podman exec mkosi mkosi ssh -- systemctl --failed
|
podman exec mkosi mkosi ssh -- systemctl --failed
|
||||||
```
|
```
|
||||||
@@ -76,5 +83,5 @@ with "has not been built yet". To boot an existing build without a rebuild, pin
|
|||||||
its version (from `mkosi.output/agent_<version>.raw`):
|
its version (from `mkosi.output/agent_<version>.raw`):
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
mkosi --image-version 202611171816 vm
|
mkosi --image-version 202611171816.c80e843 vm
|
||||||
```
|
```
|
||||||
@@ -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
|
Boot verifies the UKI (kernel, initrd and command line), which holds the
|
||||||
dm-verity hash that verifies `/usr`.
|
dm-verity hash that verifies `/usr`.
|
||||||
- **Encrypted with a TPM:** everything that isn't read-only, such as `/etc`,
|
- **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.
|
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
|
- **Tools in containers:** Claude runs as the user `agent`, without root, and
|
||||||
runs its toolchains in containers with podman.
|
runs its toolchains in containers with podman.
|
||||||
- **Self-updating:** the image rebuilds weekly. A bad update rolls back by
|
- **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.
|
digits.
|
||||||
|
|
||||||
To start over, run `systemctl start factory-reset.target` as root. It reboots
|
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
|
## Development
|
||||||
|
|
||||||
```sh
|
```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 build
|
||||||
```
|
```
|
||||||
|
|
||||||
`mkosi.output/` then holds the disk image (`agent_<version>.raw`) and the UKI
|
`mkosi.output/` then holds the disk image (`agent_<version>.raw`) and the UKI
|
||||||
and /usr partitions that make up an update.
|
and /usr partitions that make up an update.
|
||||||
|
|
||||||
To build and boot a test VM (needs `qemu-kvm-core edk2-ovmf swtpm
|
To build and boot a test VM:
|
||||||
openssh-clients socat`):
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
mkosi -f vm # opens its console: log in as root, password root
|
mkosi -f vm # This opens the console. Log in as root, password root.
|
||||||
mkosi ssh # in another terminal: ssh in as root
|
mkosi ssh # This logs in as root with ssh, in another terminal.
|
||||||
```
|
```
|
||||||
+57
-94
@@ -1,66 +1,54 @@
|
|||||||
# Agent image
|
# mkosi.conf builds a Fedora VM image that runs Claude Code in the background.
|
||||||
|
# /usr is read-only and replaced whole by updates. The root filesystem holds
|
||||||
|
# the state.
|
||||||
#
|
#
|
||||||
# A Fedora VM image that runs Claude Code in the background. mkosi.extra/ is
|
# The other parts of the build:
|
||||||
# copied to /, mkosi.repart/ defines the disk and mkosi.sandbox/ adds the
|
# - mkosi.extra/ is copied to /.
|
||||||
# Claude Code package repository. /usr is read-only and replaced whole by
|
# - mkosi.repart/ defines the disk image: the ESP and the /usr partitions.
|
||||||
# updates. The root filesystem holds the state: /var, and an /etc that is
|
# - mkosi.extra/usr/lib/repart.d/ makes the root partition at first boot.
|
||||||
# mostly links into /usr (mkosi.finalize). Claude can't change the OS, so it
|
# - mkosi.finalize keeps /etc in /usr, and links it into /etc at boot.
|
||||||
# runs its tools in containers.
|
# - mkosi.sandbox/ adds the Claude Code package repository.
|
||||||
# mkosi.extra/etc/claude-code/ sets Claude Code up for that:
|
# - mkosi.version gives each build its version.
|
||||||
# managed-settings.json lets it run without permission prompts, and CLAUDE.md
|
|
||||||
# tells it about this machine.
|
|
||||||
|
|
||||||
[Distribution]
|
[Distribution]
|
||||||
Distribution=fedora
|
Distribution=fedora
|
||||||
Release=45
|
Release=45
|
||||||
|
|
||||||
|
[Build]
|
||||||
|
# ToolsTree builds with mkosi's own Fedora tools, the same on every host,
|
||||||
|
# so the host needs only mkosi and git (for mkosi.version). The tools land in
|
||||||
|
# mkosi.tools/.
|
||||||
|
ToolsTree=yes
|
||||||
|
ToolsTreeRelease=%r
|
||||||
|
Incremental=yes
|
||||||
|
CacheDirectory=mkosi.cache
|
||||||
|
|
||||||
[Output]
|
[Output]
|
||||||
Format=disk
|
Format=disk
|
||||||
ImageId=agent
|
ImageId=agent
|
||||||
OutputDirectory=mkosi.output
|
OutputDirectory=mkosi.output
|
||||||
SplitArtifacts=uki,partitions
|
SplitArtifacts=uki,partitions
|
||||||
# ManifestFormat lists the packages and versions in the image, to tell which
|
|
||||||
# builds a CVE affects. .gitea/workflows/os.yml publishes it with the image.
|
|
||||||
ManifestFormat=json
|
ManifestFormat=json
|
||||||
|
|
||||||
[Content]
|
[Content]
|
||||||
Bootable=yes
|
|
||||||
Bootloader=systemd-boot
|
|
||||||
# Packages is systemd with its network services, plus:
|
|
||||||
# - kernel-core has no drivers or firmware beyond what VMs need.
|
|
||||||
# - systemd-container has systemd-pull, which systemd-sysupdate downloads with.
|
|
||||||
# - gnupg2 checks the signature of updates.
|
|
||||||
# - systemd-boot-unsigned is the boot loader, which mkosi signs.
|
|
||||||
# - util-linux and shadow-utils give the console login, the setup and
|
|
||||||
# newuidmap for rootless podman.
|
|
||||||
# - systemd-pam gives login sessions: Claude's user manager and its D-Bus,
|
|
||||||
# which rootless podman needs.
|
|
||||||
# - openssh-server lets you log in with ssh keys.
|
|
||||||
# - zram-generator-defaults sets up compressed swap in RAM.
|
|
||||||
# - podman and podman-docker run Claude's toolchains in containers.
|
|
||||||
# - claude-code comes from mkosi.sandbox/etc/yum.repos.d.
|
|
||||||
# - git-core and openssh-clients let Claude Code use git and push over ssh.
|
|
||||||
# - The rest are basic command-line tools Claude uses on the host.
|
|
||||||
Packages=
|
Packages=
|
||||||
kernel-core
|
kernel-core # It has no drivers or firmware VMs don't need.
|
||||||
systemd
|
systemd # It is the init and service manager.
|
||||||
dbus-broker
|
dbus-broker # It is D-Bus, for the user manager and podman.
|
||||||
systemd-udev
|
systemd-udev # It has udev, sysupdate, repart and cryptsetup.
|
||||||
systemd-networkd
|
systemd-networkd # It runs DHCP on every network card.
|
||||||
systemd-resolved
|
systemd-resolved # It resolves DNS names.
|
||||||
systemd-container
|
systemd-container # It has systemd-pull and gnupg2 for sysupdate.
|
||||||
gnupg2
|
systemd-boot-unsigned # It is the boot loader, which mkosi signs.
|
||||||
systemd-boot-unsigned
|
util-linux # It has login, for the console login.
|
||||||
util-linux
|
shadow-utils # It has newuidmap for rootless podman.
|
||||||
shadow-utils
|
systemd-pam # It gives logins a session and user manager.
|
||||||
systemd-pam
|
openssh-server # It lets you log in once there is a key.
|
||||||
openssh-server
|
zram-generator-defaults # It sets up compressed swap in RAM.
|
||||||
zram-generator-defaults
|
podman # It runs Claude's tools in containers.
|
||||||
podman
|
claude-code # It comes from mkosi.sandbox/etc/yum.repos.d.
|
||||||
podman-docker
|
git-core # It brings openssh-clients to push over ssh.
|
||||||
claude-code
|
# The rest are basic command-line tools Claude uses on the host.
|
||||||
git-core
|
|
||||||
openssh-clients
|
|
||||||
curl
|
curl
|
||||||
tar
|
tar
|
||||||
gzip
|
gzip
|
||||||
@@ -72,48 +60,37 @@ Packages=
|
|||||||
iproute
|
iproute
|
||||||
WithDocs=no
|
WithDocs=no
|
||||||
Locale=C.UTF-8
|
Locale=C.UTF-8
|
||||||
# UnifiedKernelImageFormat names UKIs the way systemd-sysupdate names the ones
|
# Hostname is agent- and four hex digits of the machine ID.
|
||||||
# it installs.
|
Hostname=agent-????
|
||||||
|
# UnifiedKernelImageFormat names the UKI in the ESP agent_<version>.efi, which
|
||||||
|
# matches the MatchPattern= of mkosi.extra/usr/lib/sysupdate.d/20-uki.transfer.
|
||||||
UnifiedKernelImageFormat=%i_%v
|
UnifiedKernelImageFormat=%i_%v
|
||||||
# KernelCommandLine sets:
|
|
||||||
# - console= shows the console on the serial port and the screen. The last
|
|
||||||
# one, the screen, is /dev/console, where systemd-firstboot asks for the root
|
|
||||||
# password at first boot.
|
|
||||||
# - rw mounts the root filesystem writable. The initrd finds it by its
|
|
||||||
# partition type (mkosi.extra/usr/lib/repart.d/50-root.conf).
|
|
||||||
# - systemd.hostname= names each machine agent- and four hex digits from its
|
|
||||||
# machine ID, from the initrd on. It wins over /etc/hostname, so hostnamectl
|
|
||||||
# renames only until the next boot.
|
|
||||||
# - systemd.image_policy= makes the initrd use only an encrypted root
|
|
||||||
# filesystem (or none yet, at first boot) and a verity-checked /usr.
|
|
||||||
# Otherwise someone with the disk could put in a plain root filesystem with
|
|
||||||
# their own /etc. Our UKI would boot it, and with PCR 11 unchanged, their
|
|
||||||
# code could unseal the key of the real one.
|
|
||||||
# - SYSTEMD_DEFAULT_MOUNT_RATE_LIMIT_BURST lets systemd handle more mount
|
|
||||||
# changes per second. At the default of 5, it holds back mounts at boot and
|
|
||||||
# delays / and /usr by up to a second each. The kernel passes it to systemd
|
|
||||||
# as environment.
|
|
||||||
KernelCommandLine=
|
KernelCommandLine=
|
||||||
|
# The console shows on the serial port and the screen. The screen
|
||||||
|
# comes last, so systemd-firstboot asks for the root password there.
|
||||||
console=ttyS0,115200n8
|
console=ttyS0,115200n8
|
||||||
console=tty0
|
console=tty0
|
||||||
quiet
|
quiet
|
||||||
|
# The initrd finds the root filesystem by its partition type
|
||||||
|
# (mkosi.extra/usr/lib/repart.d/50-root.conf) and mounts it writable.
|
||||||
rw
|
rw
|
||||||
systemd.hostname=agent-????
|
# The image policy only accepts an encrypted root filesystem (or none,
|
||||||
|
# at first boot) and a verity-checked /usr. Otherwise someone with the
|
||||||
|
# disk could swap in a plain root filesystem. Our UKI would boot it, and
|
||||||
|
# their code could unseal the key of the real one.
|
||||||
systemd.image_policy=root=encrypted+absent:usr=verity:esp=unprotected
|
systemd.image_policy=root=encrypted+absent:usr=verity:esp=unprotected
|
||||||
|
# The mount rate limit is raised from 5, which holds back mounts at
|
||||||
|
# boot and delays / and /usr by up to a second each.
|
||||||
SYSTEMD_DEFAULT_MOUNT_RATE_LIMIT_BURST=50
|
SYSTEMD_DEFAULT_MOUNT_RATE_LIMIT_BURST=50
|
||||||
# KernelInitrdModules are the modules the initrd needs to find the disks of a
|
# KernelInitrdModules are the modules the initrd needs to find the disks of a
|
||||||
# VM, mount /usr and make, unlock and mount the root filesystem.
|
# VM, mount /usr and unlock the root filesystem. The kernel has virtio_blk,
|
||||||
|
# sd_mod, the TPM drivers and btrfs built in.
|
||||||
KernelInitrdModules=
|
KernelInitrdModules=
|
||||||
virtio_blk
|
|
||||||
virtio_scsi
|
virtio_scsi
|
||||||
sd_mod
|
|
||||||
nvme
|
nvme
|
||||||
tpm_tis
|
|
||||||
tpm_crb
|
|
||||||
dm-verity
|
dm-verity
|
||||||
dm-crypt
|
dm-crypt
|
||||||
erofs
|
erofs
|
||||||
btrfs
|
|
||||||
# KernelModules keeps all modules but the hardware drivers, then the drivers a
|
# KernelModules keeps all modules but the hardware drivers, then the drivers a
|
||||||
# VM needs (disks, network, screen) and those of rootless podman's networks
|
# 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
|
# (pasta). The last matching line wins. Keyboard, USB and a basic screen are
|
||||||
@@ -126,7 +103,6 @@ KernelModules=
|
|||||||
/drivers/md/*
|
/drivers/md/*
|
||||||
nvme
|
nvme
|
||||||
virtio_scsi
|
virtio_scsi
|
||||||
sd_mod
|
|
||||||
virtio_net
|
virtio_net
|
||||||
qemu_fw_cfg
|
qemu_fw_cfg
|
||||||
bochs
|
bochs
|
||||||
@@ -135,42 +111,29 @@ KernelModules=
|
|||||||
tun
|
tun
|
||||||
# RemoveFiles drops what the image doesn't use:
|
# RemoveFiles drops what the image doesn't use:
|
||||||
# - System.map is only for debugging the kernel.
|
# - System.map is only for debugging the kernel.
|
||||||
# - The udev hwdb holds hardware names and quirks, nothing a VM needs.
|
# - The udev hwdb holds hardware names and quirks, nothing a VM needs. Without
|
||||||
# - homed, userdbd and nsresourced are unused services.
|
# hwdb.d, systemd-hwdb-update can't build it again at boot.
|
||||||
RemoveFiles=
|
RemoveFiles=
|
||||||
/usr/lib/modules/*/System.map
|
/usr/lib/modules/*/System.map
|
||||||
/usr/lib/udev/hwdb.bin
|
/usr/lib/udev/hwdb.bin
|
||||||
/usr/lib/udev/hwdb.d
|
/usr/lib/udev/hwdb.d
|
||||||
/usr/lib/systemd/system/systemd-homed*
|
|
||||||
/usr/lib/systemd/system/systemd-userdbd.*
|
|
||||||
/usr/lib/systemd/system/systemd-nsresourced.*
|
|
||||||
|
|
||||||
[Validation]
|
[Validation]
|
||||||
# SecureBoot signs systemd-boot and the UKI, and puts our keys on the ESP.
|
# SecureBoot signs systemd-boot and the UKI, and puts our keys on the ESP.
|
||||||
# systemd-boot enrolls them at first boot if the firmware is in setup mode (no
|
# 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
|
# keys enrolled).
|
||||||
# is the SECUREBOOT_KEY secret, which .gitea/workflows/os.yml writes.
|
|
||||||
SecureBoot=yes
|
SecureBoot=yes
|
||||||
SecureBootKey=mkosi.key
|
|
||||||
SecureBootCertificate=mkosi.crt
|
|
||||||
# SignExpectedPcr signs the PCR 11 values that each UKI will measure, with
|
# SignExpectedPcr signs the PCR 11 values that each UKI will measure, with
|
||||||
# mkosi.key. The TPM then unlocks the root filesystem only for UKIs we signed,
|
# mkosi.key. The TPM then unlocks the root filesystem only for UKIs we signed,
|
||||||
# also after updates (mkosi.extra/usr/lib/repart.d/50-root.conf).
|
# also after updates (mkosi.extra/usr/lib/repart.d/50-root.conf).
|
||||||
SignExpectedPcr=yes
|
SignExpectedPcr=yes
|
||||||
|
|
||||||
[Runtime]
|
[Runtime]
|
||||||
# Runtime sets up the test VM of mkosi vm (AGENTS.md). Ephemeral boots a copy,
|
# Runtime sets up the test VM of mkosi vm.
|
||||||
# so test runs don't change the built image. Credentials sets the root
|
|
||||||
# password, and systemd.firstboot=no skips the questions at first boot, such
|
|
||||||
# as the offer of a recovery key. mkosi ssh logs in as root with mkosi.key,
|
|
||||||
# which mkosi also authorizes for root in the VM.
|
|
||||||
Ephemeral=yes
|
Ephemeral=yes
|
||||||
CPUs=4
|
CPUs=4
|
||||||
RAM=8G
|
RAM=4G
|
||||||
RuntimeSize=40G
|
RuntimeSize=40G
|
||||||
# QemuArgs joins the serial port to the console mkosi vm shows (hvc0). The UKI
|
|
||||||
# doesn't use hvc0: with Secure Boot, systemd-stub ignores the console= mkosi
|
|
||||||
# passes.
|
|
||||||
QemuArgs=-serial chardev:console
|
QemuArgs=-serial chardev:console
|
||||||
Credentials=passwd.plaintext-password.root=root
|
Credentials=passwd.plaintext-password.root=root
|
||||||
KernelCommandLineExtra=systemd.firstboot=no
|
KernelCommandLineExtra=systemd.firstboot=no
|
||||||
@@ -3,11 +3,13 @@
|
|||||||
You run on a small Fedora VM made for you, as the user `claude`, without root.
|
You run on a small Fedora VM made for you, as the user `claude`, without root.
|
||||||
|
|
||||||
- **The OS is read-only**: you can't install anything on it. Run toolchains, languages and
|
- **The OS is read-only**: you can't install anything on it. Run toolchains, languages and
|
||||||
services in containers, with rootless `podman` (also as `docker`). For quick commands:
|
services in containers, with rootless `podman`. For quick commands:
|
||||||
`podman run --rm -v "$PWD:/w" -w /w docker.io/library/python:3 python script.py`.
|
`podman run --rm -v "$PWD:/w" -w /w docker.io/library/python:3 python script.py`.
|
||||||
For longer work, keep a dev container you can install into:
|
For longer work, keep one dev container per worktree or session, named after its directory,
|
||||||
`podman run -d --name dev -v ~:/w -w /w quay.io/fedora/fedora:45 sleep infinity`, then
|
that you install into:
|
||||||
`podman exec dev dnf install -y gcc` and `podman exec dev make`.
|
`podman run -d --name "${PWD##*/}" -v "$PWD:$PWD" -w "$PWD" quay.io/fedora/fedora:latest sleep infinity`,
|
||||||
|
then `podman exec "${PWD##*/}" dnf install -y gcc` and `podman exec "${PWD##*/}" make`.
|
||||||
|
Remove it with `podman rm -f` when the work is done.
|
||||||
- On the host: git, ssh, curl, tar/gzip/xz/zstd, find, diff, ps, ip.
|
- On the host: git, ssh, curl, tar/gzip/xz/zstd, find, diff, ps, ip.
|
||||||
- **Your files survive reboots**: your home (/home/claude), containers and images stay.
|
- **Your files survive reboots**: your home (/home/claude), containers and images stay.
|
||||||
/tmp is wiped at every boot. The VM may reboot at about 04:10 to update.
|
/tmp is wiped at every boot. The VM may reboot at about 04:10 to update.
|
||||||
|
|||||||
@@ -1,11 +1,9 @@
|
|||||||
# Root filesystem
|
# 50-root.conf makes the root filesystem in the initrd at first boot, from the
|
||||||
#
|
# free space after /usr, and grows it when the disk grows. It holds all state:
|
||||||
# systemd-repart makes it in the initrd at first boot, from the free space
|
# /etc (mkosi.finalize) and /var, which is its own btrfs subvolume. It is
|
||||||
# after /usr, and grows it when the disk grows. It holds all state: /etc
|
# encrypted with a key in the TPM, so a TPM is required. The key is sealed to
|
||||||
# (mkosi.finalize) and /var, which is its own btrfs subvolume. It is encrypted
|
# the signed PCR 11 policy of our UKIs (SignExpectedPcr= in mkosi.conf), and
|
||||||
# with a key in the TPM, so a TPM is required. The key is sealed to the signed
|
# the initrd unlocks it at every boot.
|
||||||
# PCR 11 policy of our UKIs (SignExpectedPcr= in mkosi.conf), and the initrd
|
|
||||||
# unlocks it at every boot.
|
|
||||||
#
|
#
|
||||||
# FactoryReset makes a factory reset wipe it: root runs systemctl start
|
# FactoryReset makes a factory reset wipe it: root runs systemctl start
|
||||||
# factory-reset.target, and at the next boot it is made anew, as at first boot.
|
# factory-reset.target, and at the next boot it is made anew, as at first boot.
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
# Kernel settings
|
# 50-agent.conf raises the inotify instances per user. Containers (file
|
||||||
#
|
# watchers, systemd in containers) run out of Fedora's 128. 8192 is common on
|
||||||
# Containers (file watchers, systemd in containers) run out of Fedora's 128
|
# Kubernetes nodes.
|
||||||
# inotify instances per user. 8192 is common on Kubernetes nodes.
|
|
||||||
fs.inotify.max_user_instances = 8192
|
fs.inotify.max_user_instances = 8192
|
||||||
@@ -1,7 +1,5 @@
|
|||||||
# Network
|
# 80-dhcp.network turns on DHCP on the real network cards. Kind=!* skips
|
||||||
#
|
# virtual links such as those of containers.
|
||||||
# DHCP on the real network cards. Kind=!* skips virtual links such as those of
|
|
||||||
# containers.
|
|
||||||
[Match]
|
[Match]
|
||||||
Type=ether
|
Type=ether
|
||||||
Kind=!*
|
Kind=!*
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
# Enabled services
|
# 50-agent.preset enables the services of the image. mkosi runs systemctl
|
||||||
#
|
# preset-all, which applies it. It sorts before Fedora's presets, so it wins
|
||||||
# mkosi runs systemctl preset-all, which applies this file. It sorts before
|
# where they disagree.
|
||||||
# Fedora's presets, so it wins where they disagree.
|
|
||||||
|
|
||||||
enable systemd-networkd.service
|
enable systemd-networkd.service
|
||||||
enable systemd-resolved.service
|
enable systemd-resolved.service
|
||||||
@@ -18,3 +17,9 @@ enable systemd-sysupdate-reboot.timer
|
|||||||
# authselect-apply-changes would rewrite /etc/authselect, which links into the
|
# authselect-apply-changes would rewrite /etc/authselect, which links into the
|
||||||
# read-only /usr (mkosi.finalize), and fails.
|
# read-only /usr (mkosi.finalize), and fails.
|
||||||
disable authselect-apply-changes.service
|
disable authselect-apply-changes.service
|
||||||
|
# systemd-homed, systemd-userdbd and systemd-nsresourced are unused here.
|
||||||
|
# Fedora enables them.
|
||||||
|
disable systemd-homed.service
|
||||||
|
disable systemd-homed-activate.service
|
||||||
|
disable systemd-userdbd.socket
|
||||||
|
disable systemd-nsresourced.socket
|
||||||
@@ -1,7 +1,5 @@
|
|||||||
# Start Claude when logged in
|
# claude-remote.path starts claude-remote.service once Claude has a login: at
|
||||||
#
|
# boot, or as soon as the user first logs in.
|
||||||
# Starts claude-remote.service once Claude has a login: at boot, or as soon as
|
|
||||||
# the user first logs in.
|
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Start Claude Remote Control once logged in
|
Description=Start Claude Remote Control once logged in
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
# Claude Remote Control
|
# claude-remote.service runs Claude Code in the background, as the user agent
|
||||||
#
|
# in its home, so it can be used from claude.ai/code or the Claude app.
|
||||||
# Runs Claude Code in the background, as the user agent in its home, so it can
|
# claude-remote.path starts it once Claude is logged in.
|
||||||
# be used from claude.ai/code or the Claude app. claude-remote.path starts it
|
|
||||||
# once Claude is logged in.
|
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Claude Code Remote Control
|
Description=Claude Code Remote Control
|
||||||
Wants=network-online.target user@1000.service
|
Wants=network-online.target user@1000.service
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
# Start sshd once there is a key
|
# sshd.path starts sshd only once root or the user agent has an ssh key, so a
|
||||||
#
|
# new VM has no open port. Root adds the keys after the first boot
|
||||||
# sshd starts only once root or the user agent has an ssh key, so a new VM
|
# (README.md). The ssh.authorized_keys.root credential also fills root's, such
|
||||||
# has no open port. Root adds the keys after the first boot (README.md). The
|
# as for mkosi ssh.
|
||||||
# ssh.authorized_keys.root credential also fills root's, such as for mkosi ssh.
|
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Start sshd once an ssh key is set
|
Description=Start sshd once an ssh key is set
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
# /usr update
|
# 10-usr.transfer writes the next version of /usr to the unused /usr
|
||||||
|
# partition. The files come from .gitea/workflows/os.yml.
|
||||||
#
|
#
|
||||||
# Writes the next version of /usr to the unused /usr partition.
|
# Verify=yes requires SHA256SUMS.gpg to be signed by a key in
|
||||||
# Verify=yes: SHA256SUMS.gpg must be signed by a key in
|
|
||||||
# /usr/lib/systemd/import-pubring.pgp, and SHA256SUMS checks each download.
|
# /usr/lib/systemd/import-pubring.pgp, and SHA256SUMS checks each download.
|
||||||
# The files come from .gitea/workflows/os.yml.
|
|
||||||
[Transfer]
|
[Transfer]
|
||||||
ProtectVersion=%A
|
ProtectVersion=%A
|
||||||
Verify=yes
|
Verify=yes
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
# /usr verity update
|
# 11-usr-verity.transfer writes the dm-verity hashes that go with
|
||||||
#
|
# 10-usr.transfer, which explains Verify=yes.
|
||||||
# Writes the dm-verity hashes that go with 10-usr.transfer, which explains
|
|
||||||
# Verify=yes.
|
|
||||||
[Transfer]
|
[Transfer]
|
||||||
ProtectVersion=%A
|
ProtectVersion=%A
|
||||||
Verify=yes
|
Verify=yes
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
# UKI update
|
# 20-uki.transfer installs the next UKI, which systemd-boot then boots by
|
||||||
#
|
# default. For Verify=yes, see 10-usr.transfer.
|
||||||
# Installs the next UKI, which systemd-boot then boots by default. For
|
|
||||||
# Verify=yes, see 10-usr.transfer.
|
|
||||||
#
|
#
|
||||||
# The new UKI gets three tries (boot counting: the +@l-@d in its name).
|
# The new UKI gets three tries (boot counting: the +@l-@d in its name).
|
||||||
# systemd-bless-boot marks it good once a boot reaches boot-complete.target.
|
# systemd-bless-boot marks it good once a boot reaches boot-complete.target.
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
# Agent user
|
# agent.conf adds the user agent, which Claude runs as. /etc/subuid and
|
||||||
#
|
# /etc/subgid give it the ids that rootless podman needs.
|
||||||
# The user Claude runs as. /etc/subuid and /etc/subgid give it the ids that
|
|
||||||
# rootless podman needs.
|
|
||||||
u agent 1000 "Agent" /home/agent /bin/bash
|
u agent 1000 "Agent" /home/agent /bin/bash
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
# Agent home
|
# agent.conf makes the home of the user agent
|
||||||
#
|
# (mkosi.extra/usr/lib/sysusers.d/agent.conf), with Claude's login and podman
|
||||||
# The home of the user agent (mkosi.extra/usr/lib/sysusers.d/agent.conf), with
|
# storage.
|
||||||
# Claude's login and podman storage.
|
|
||||||
d /home/agent 0700 agent agent -
|
d /home/agent 0700 agent agent -
|
||||||
# linger starts the user manager of agent at boot, for rootless podman and
|
# linger starts the user manager of agent at boot, for rootless podman and
|
||||||
# Claude's own services.
|
# Claude's own services.
|
||||||
|
|||||||
+28
-22
@@ -1,42 +1,48 @@
|
|||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
# Factory /etc
|
# mkosi.finalize keeps the /etc that the packages and mkosi.extra/etc made in
|
||||||
#
|
# /usr/share/factory/etc, because the image ships only /usr (mkosi.repart). It
|
||||||
# The image ships only /usr (mkosi.repart), so this keeps the /etc that the
|
# writes /usr/lib/tmpfiles.d/factory-etc.conf, with which systemd-tmpfiles
|
||||||
# packages and mkosi.extra/etc made in /usr/share/factory/etc. It writes
|
# links each entry into the writable, empty /etc at boot. Updates to /usr then
|
||||||
# /usr/lib/tmpfiles.d/factory-etc.conf, with which systemd-tmpfiles links each
|
# take effect in /etc too. /etc itself holds only what the machine writes:
|
||||||
# entry into the writable, empty /etc at boot. Updates to /usr then take
|
# passwd, shadow, group, machine-id and the ssh host keys.
|
||||||
# effect in /etc too. /etc itself holds only what the machine writes: passwd,
|
set -euo pipefail
|
||||||
# shadow, group, hostname, machine-id and the ssh host keys.
|
|
||||||
set -eu
|
|
||||||
|
|
||||||
factory=$BUILDROOT/usr/share/factory/etc
|
factory=$BUILDROOT/usr/share/factory/etc
|
||||||
cp -a --no-target-directory --update=none "$BUILDROOT/etc" "$factory"
|
cp -a --no-target-directory --update=none "$BUILDROOT/etc" "$factory"
|
||||||
|
|
||||||
# skip holds what /etc keeps for itself, and what other tmpfiles.d files
|
# skip holds what /etc keeps for itself, and what other tmpfiles.d files
|
||||||
# already set up, such as /etc/os-release.
|
# already set up, such as /etc/os-release.
|
||||||
skip=$(printf '%s\n' passwd group shadow gshadow hostname machine-id ssh
|
skip=$(printf '%s\n' passwd group shadow gshadow machine-id ssh
|
||||||
sed -n 's|^[^#][^ ]* */etc/\([^/ ]*\).*|\1|p' "$BUILDROOT"/usr/lib/tmpfiles.d/*.conf)
|
sed -n 's|^[^#][^ ]* */etc/\([^/ ]*\).*|\1|p' "$BUILDROOT"/usr/lib/tmpfiles.d/*.conf)
|
||||||
|
|
||||||
# link prints the tmpfiles line for /etc/$1. Some entries are copied instead:
|
# link prints the tmpfiles line for /etc/$1. Some entries are copied instead:
|
||||||
# a symlink, because a relative one would point somewhere else from the
|
# a symlink, because a relative one would point somewhere else from the
|
||||||
# factory, and subuid and subgid, because shadow-utils won't read them through
|
# factory, and subuid and subgid, because shadow-utils won't read them through
|
||||||
# a link.
|
# a link.
|
||||||
|
#
|
||||||
|
# systemd gets L+, which replaces a directory. At first boot, PID 1 applies the
|
||||||
|
# presets before systemd-tmpfiles runs, and so makes /etc/systemd/system. That
|
||||||
|
# would block the link, and with it /etc/systemd/user and later updates.
|
||||||
link() {
|
link() {
|
||||||
case "$1" in
|
if [[ $1 == subuid || $1 == subgid || -L $factory/$1 ]]; then
|
||||||
subuid|subgid) echo "C /etc/$1" ;;
|
echo "C /etc/$1"
|
||||||
*) if [ -L "$factory/$1" ]; then echo "C /etc/$1"; else echo "L /etc/$1"; fi ;;
|
elif [[ $1 == systemd ]]; then
|
||||||
esac
|
echo "L+ /etc/$1"
|
||||||
|
else
|
||||||
|
echo "L /etc/$1"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
echo "# Generated by mkosi.finalize."
|
echo "# Generated by mkosi.finalize."
|
||||||
for f in $(ls -A "$factory"); do
|
# Entries ending in - are backups, such as passwd-.
|
||||||
case "$f" in *-|.*) continue ;; esac
|
for path in "$factory"/*; do
|
||||||
echo "$skip" | grep -qxF "$f" || link "$f"
|
f=${path##*/}
|
||||||
|
[[ $f == *- ]] || grep -qxF "$f" <<< "$skip" || link "$f"
|
||||||
done
|
done
|
||||||
# /etc/ssh is a directory of its own, because sshd-keygen writes the host
|
# /etc/ssh is a writable directory instead of one link, because sshd-keygen
|
||||||
# keys there.
|
# writes the host keys there at first boot. Its other entries are linked one
|
||||||
|
# by one, so they still get updates from /usr.
|
||||||
echo "d /etc/ssh 0755"
|
echo "d /etc/ssh 0755"
|
||||||
for f in $(ls -A "$factory/ssh"); do link "ssh/$f"; done
|
for path in "$factory"/ssh/*; do link "ssh/${path##*/}"; done
|
||||||
} > "$BUILDROOT/usr/lib/tmpfiles.d/factory-etc.conf"
|
} > "$BUILDROOT/usr/lib/tmpfiles.d/factory-etc.conf"
|
||||||
|
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
# EFI system partition
|
# 00-esp.conf defines the EFI system partition. It holds systemd-boot and the
|
||||||
#
|
# UKIs, two versions at most.
|
||||||
# Holds systemd-boot and the UKIs, two versions at most.
|
|
||||||
[Partition]
|
[Partition]
|
||||||
Type=esp
|
Type=esp
|
||||||
Format=vfat
|
Format=vfat
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
# /usr, slot A
|
# 10-usr.conf defines /usr in slot A: the OS as read-only erofs, protected by
|
||||||
#
|
# dm-verity (usrhash= in the UKI). Updates replace it whole. The image holds
|
||||||
# The OS as read-only erofs, protected by dm-verity (usrhash= in the UKI).
|
# nothing else but the ESP: the initrd makes the root filesystem, with /etc
|
||||||
# Updates replace it whole. The image holds nothing else but the ESP: the
|
# and /var, at first boot (mkosi.extra/usr/lib/repart.d/50-root.conf).
|
||||||
# initrd makes the root filesystem, with /etc and /var, at first boot
|
|
||||||
# (mkosi.extra/usr/lib/repart.d/50-root.conf).
|
|
||||||
[Partition]
|
[Partition]
|
||||||
Type=usr
|
Type=usr
|
||||||
Label=%M_%A
|
Label=%M_%A
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
# /usr verity, slot A
|
# 11-usr-verity.conf holds the dm-verity hashes of /usr in 10-usr.conf.
|
||||||
#
|
|
||||||
# The dm-verity hashes of /usr in 10-usr.conf.
|
|
||||||
[Partition]
|
[Partition]
|
||||||
Type=usr-verity
|
Type=usr-verity
|
||||||
Label=%M_%A_verity
|
Label=%M_%A_verity
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
# /usr, slot B
|
# 20-usr-b.conf defines /usr in slot B. It stays empty until systemd-sysupdate
|
||||||
#
|
# writes the next version to it.
|
||||||
# Empty until systemd-sysupdate writes the next version to it.
|
|
||||||
[Partition]
|
[Partition]
|
||||||
Type=usr
|
Type=usr
|
||||||
Label=_empty
|
Label=_empty
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
# /usr verity, slot B
|
# 21-usr-verity-b.conf holds the dm-verity hashes for 20-usr-b.conf, empty
|
||||||
#
|
# until the next update.
|
||||||
# The dm-verity hashes for 20-usr-b.conf, empty until the next update.
|
|
||||||
[Partition]
|
[Partition]
|
||||||
Type=usr-verity
|
Type=usr-verity
|
||||||
Label=_empty
|
Label=_empty
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
# Claude Code repository
|
# claude-code.repo adds Anthropic's package repository, stable channel. mkosi
|
||||||
#
|
# uses it to install the claude-code package (mkosi.conf). The key's
|
||||||
# Anthropic's package repository, stable channel. mkosi uses it to install the
|
# fingerprint is 31DDDE24DDFAB679F42D7BD2BAA929FF1A7ECACE.
|
||||||
# claude-code package (mkosi.conf). The key's fingerprint is
|
|
||||||
# 31DDDE24DDFAB679F42D7BD2BAA929FF1A7ECACE.
|
|
||||||
[claude-code]
|
[claude-code]
|
||||||
name=Claude Code
|
name=Claude Code
|
||||||
baseurl=https://downloads.claude.ai/claude-code/rpm/stable
|
baseurl=https://downloads.claude.ai/claude-code/rpm/stable
|
||||||
|
|||||||
+8
-7
@@ -1,7 +1,8 @@
|
|||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
# Image version
|
# mkosi.version prints the build time in UTC (YYYYMMDDhhmm) and the git
|
||||||
#
|
# commit. Every build gets a higher version than the one before, which is how
|
||||||
# Prints the build time in UTC (YYYYMMDDhhmm). Every build gets a higher
|
# systemd-sysupdate tells that an update is newer. The commit tells which
|
||||||
# version than the one before, which is how systemd-sysupdate tells that an
|
# source an image was built from.
|
||||||
# update is newer.
|
set -euo pipefail
|
||||||
date -u +%Y%m%d%H%M
|
commit=$(git rev-parse --short HEAD)
|
||||||
|
echo "$(date -u +%Y%m%d%H%M).$commit"
|
||||||
Reference in new issue
Block a user