Easy to use nixos image generators


#1

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


#2

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)
https://github.com/NixOS/nixpkgs/pull/9722 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


#3

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


#4

Lasselus is currently working on netboot images: https://github.com/NixOS/nixos-channel-scripts/pull/21#issuecomment-454874956 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.