Check out: GitHub - nix-community/nixos-generators: Collection of image builders [maintainer=@Lassulus]
Maintainer is @lassulus
L0.0ks interesting thanks for the link !
In the past i did some messing about
applying this ( stage-1-init: add support for the ability of specify a name of squashfs image)
stage-1-init: add support for the ability of specify a name of squashfs image by akaWolf · Pull Request #9722 · NixOS/nixpkgs · GitHub now closed PR / patch
to nixos/modules/system/boot/stage-1-init.sh
This option makes for easy testing different squashfs from same disk\partition .
So now im wondering how easy would it be to
-
apply this patch
-
create a ./bin/make-squashfs to output only a nix#name.squashfs initrd#name.lz kernel#name
hopefully the above make sense xD
for the curious cats i found some of the magic resides @
nixpkgs/make-squashfs.nix at e8c996295762c91f9b208974a53568e3a38e588a · NixOS/nixpkgs · GitHub …
&
nixpkgs/make-squashfs.nix at master · NixOS/nixpkgs · GitHub …
Could this be used to generate a smaller PXE image to boot on computers with not enough RAM for the normal PXE image?
Lasselus is currently working on netboot images: Add netboot files by lheckemann · Pull Request #21 · NixOS/nixos-channel-scripts · GitHub They are still based on our iso, which is rather large. I think your best shot would be to build an initrd that mounts nixos via nfs.