Easy to use nixos image generators

Check out: https://github.com/nix-community/nixos-generators
Maintainer is @lassulus

3 Likes

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

  1. apply this patch

  2. 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 :sunglasses: i found some of the magic resides @

https://github.com/NixOS/nixpkgs/blob/e8c996295762c91f9b208974a53568e3a38e588a/nixos/lib/make-squashfs.nix
&
https://github.com/NixOS/nixpkgs/blob/master/nixos/lib/make-squashfs.nix

Could this be used to generate a smaller PXE image to boot on computers with not enough RAM for the normal PXE image?

1 Like

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.

1 Like