Restructure build outputs into iso/lxc/pxe/all, fix broken LXC tarball

proxmox-lxc.nix was missing nixpkgs's own
nixos/modules/virtualisation/proxmox-lxc.nix — the module that actually
provides system.build.tarball — so nix build .#images (the old
combined target) failed with "attribute 'tarball' missing" for the LXC
half. Importing it (enabled by default) fixes this with no other
config needed.

flake.nix packages now expose exactly four targets instead of the
previous ad-hoc netboot-ipxe/netboot-initrd/netboot-kernel/images:
  - iso  — installer ISO/netboot image
  - lxc  — Proxmox LXC installer tarball
  - pxe  — the three netboot components, bundled
  - all  — iso + lxc + pxe, bundled

README updated to match (Build Targets section replaces the stale
nixos-generators-based instructions).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-19 14:12:38 +10:00
co-authored by Claude Sonnet 5
parent 5a7bdea454
commit 0c70c63371
3 changed files with 28 additions and 45 deletions
+10 -26
View File
@@ -71,35 +71,20 @@ The target machine requires:
* A disk defined by its Disko configuration.
* SSH access or local console access.
## Build The Installer ISO
## Build Targets
From the repository root:
Four packages, built directly from `nixosConfigurations.*` via
`system.build.*` (no `nixos-generators` dependency):
```sh
nix build
nix build .#iso # installer ISO/netboot image (nixosConfigurations.installer)
nix build .#lxc # Proxmox LXC installer tarball (nixosConfigurations.proxmox-lxc)
nix build .#pxe # netboot-ipxe + netboot-initrd + netboot-kernel, bundled
nix build .#all # all three of the above, bundled
```
The generated installer ISO will be available through the `result` symlink.
The ISO is generated using:
```nix
nixos-generators.nixosGenerate {
format = "install-iso";
}
```
## Build Netboot Components
The flake also exposes netboot components:
```sh
nix build .#netboot-ipxe
nix build .#netboot-initrd
nix build .#netboot-kernel
```
These can be used to PXE boot the installer environment.
Each one is available through the `result` symlink afterward (`result/iso/`,
`result/tarball/`, or the bundle's subdirectories for `pxe`/`all`).
## Use The Installer
@@ -289,8 +274,7 @@ it as required unless you've specifically confirmed otherwise.
will fail on first boot regardless of step 4 below.
**4. Build and boot the installer image** on the target machine (ISO,
netboot, or Proxmox LXC — see "Build The Installer ISO" / "Build
Netboot Components" above).
netboot, or Proxmox LXC — see "Build Targets" above).
**5. Copy the generated private key onto the live installer environment**
once it's reachable over SSH:
+16 -18
View File
@@ -84,28 +84,26 @@
# nix build .#name
#
packages.${system} = {
packages.${system} = rec {
netboot-ipxe =
netbootSystem.config.system.build.netbootIpxeScript;
iso =
self.nixosConfigurations.installer.config.system.build.isoImage;
lxc =
self.nixosConfigurations.proxmox-lxc.config.system.build.tarball;
netboot-initrd =
netbootSystem.config.system.build.netbootRamdisk;
pxe =
pkgs.linkFarm "pxe" [
{ name = "netboot.ipxe"; path = netbootSystem.config.system.build.netbootIpxeScript; }
{ name = "initrd"; path = netbootSystem.config.system.build.netbootRamdisk; }
{ name = "kernel"; path = netbootSystem.config.system.build.kernel; }
];
netboot-kernel =
netbootSystem.config.system.build.kernel;
images =
pkgs.linkFarm "images" [
{
name = "installer-iso";
path = self.nixosConfigurations.installer.config.system.build.isoImage;
}
{
name = "proxmox-lxc";
path = self.nixosConfigurations.proxmox-lxc.config.system.build.tarball;
}
all =
pkgs.linkFarm "all" [
{ name = "iso"; path = iso; }
{ name = "lxc"; path = lxc; }
{ name = "pxe"; path = pxe; }
];
};
+2 -1
View File
@@ -1,8 +1,9 @@
{ pkgs, ... }:
{ modulesPath, ... }:
{
imports = [
./common.nix
(modulesPath + "/virtualisation/proxmox-lxc.nix")
];