diff --git a/README.md b/README.md index ac2e577..8332954 100644 --- a/README.md +++ b/README.md @@ -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: diff --git a/flake.nix b/flake.nix index 0eaa375..a23786b 100644 --- a/flake.nix +++ b/flake.nix @@ -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; } ]; }; diff --git a/proxmox-lxc.nix b/proxmox-lxc.nix index 23c0884..305c286 100644 --- a/proxmox-lxc.nix +++ b/proxmox-lxc.nix @@ -1,8 +1,9 @@ -{ pkgs, ... }: +{ modulesPath, ... }: { imports = [ ./common.nix + (modulesPath + "/virtualisation/proxmox-lxc.nix") ];