Skip to content

Build the install-time kexec image from our pinned nixpkgs - #48

Open
byjpr wants to merge 1 commit into
claude/admiring-planck-25cvzffrom
claude/fix-23-pinned-kexec
Open

byjpr wants to merge 1 commit into
claude/admiring-planck-25cvzffrom
claude/fix-23-pinned-kexec

Conversation

@byjpr

@byjpr byjpr commented Oct 9, 2026

Copy link
Copy Markdown
Owner

Closes #23

Changes

  • New flake input nixos-images, with both of its nixpkgs inputs following ours. Only its NixOS modules (kexec-installer, noninteractive) are used.
  • packages.x86_64-linux.kexec-installer builds nixos-kexec-installer-noninteractive-x86_64-linux.tar.gz from our pinned nixpkgs, so the installer is covered by flake.lock like the server itself.
  • just install builds it and passes it to nixos-anywhere with --kexec <local file>. nixos-anywhere then uploads it, instead of having the server download the latest nixos-images release from GitHub.
  • Fallback: where no x86_64-linux builder is available (e.g. macOS without a Linux builder), it falls back to nixos-anywhere's default download with a warning.

Testing

  • I built the package locally from the pinned nixpkgs. It took 16 minutes on 4 cores the first time and is cached after that. The result is a 479 MB tarball containing kexec/run, kexec/bzImage, kexec/initrd, kexec/kexec and kexec/ip, with the file name install.sh expects.
  • I confirmed in nixos-anywhere's source that --kexec accepts a local file and uploads it (localUploadCommand).
  • All 5 provider example systems build. nixfmt, shellcheck and tofu validate pass.
  • Not booted on a real server. The image is built by the same nixos-images module as the official releases, just with our nixpkgs.

Note

The first just install on a machine now builds the image, which takes about 15 minutes unless it's already in the Nix store.

🤖 Generated with Claude Code

https://claude.ai/code/session_01G22o7QQ17GRtkCqpJNFr9B


Generated by Claude Code

nixos-anywhere downloaded its installer from the latest nixos-images
GitHub release by default and ran it as root on the server. The flake now
builds it (packages.x86_64-linux.kexec-installer) from the nixos-images
module with our own nixpkgs, pinned in flake.lock, and just install
passes it via --kexec; it falls back to the download with a warning where
no x86_64-linux builder is available.

Closes #23

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01G22o7QQ17GRtkCqpJNFr9B
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Low] Installer image is fetched from GitHub at install time

2 participants