Create full netboot images in 15 seconds.
Go to file
2020-06-08 09:17:32 -04:00
pkgs squashes / cpios: properly break the Nix storepaths by breaking them up in to chunks 2020-06-08 09:17:32 -04:00
quickly.nix squashes / cpios: properly break the Nix storepaths by breaking them up in to chunks 2020-06-08 09:17:32 -04:00
README.md hello 2020-05-25 22:17:40 -04:00
test.nix quickly: copy out of squashes so systemd doesn't try to unmount them 2020-06-08 08:26:06 -04:00

netboot.nix

Alternative expressions for netboot.

In the future, I'd like to structure this as a module, to easily turn on recursive Nix builds, or target a ZFS filesystem, etc.

Also, the future should include tests in this repo.

Included Module Expressions

  • ./quickly.nix uses recursive Nix to build the initrd and squashfs filesystems more quickly, allowing for faster iteration of images. Initial testing reduced build time from 5-10 minutes per image to 15-30 seconds.

Setting up recursive nix

Setting up recursive Nix requires support on the build machine:

{ pkgs, ... }: {
  nix = {
    package = pkgs.nixUnstable;
    systemFeatures = [ "recursive-nix" "kvm" "nixos-test" ];
    extraOptions = ''
      experimental-features = recursive-nix
    '';
  };
}