2986dec15087529cdbf3606ef5b2a093e0e09e98
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.nixuses 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.The
./size-test/build.shtest is able to build an incremental netboot image in just 12 seconds, and the initrd is not rebuilt.
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
'';
};
}
Description
Languages
Nix
97.5%
Shell
2.5%