Restructure the readme
This commit is contained in:
parent
eece64679c
commit
9e6f3170e8
40
README.md
40
README.md
@ -1,33 +1,20 @@
|
|||||||
# netboot.nix
|
# netboot.nix: 15 second netboot iterations
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
The `./size-test/build.sh` test is able to build an incremental
|
|
||||||
netboot image in just 12 seconds, and the initrd is not rebuilt.
|
|
||||||
|
|
||||||
|
|
||||||
## How to Use
|
## How to Use
|
||||||
|
|
||||||
First set up recursive nix on your builder. Then:
|
1. set up recursive nix on your builder (see below)
|
||||||
|
2. add `quickly.nix` to your system's imports, like in
|
||||||
|
`./size-test/base.nix`
|
||||||
|
3. then build your iPXE boot directory:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ nix-build '<nixpkgs/nixos>' -I nixos-config=./size-test/base.nix -A config.system.build.ipxeBootDir
|
$ nix-build '<nixpkgs/nixos>' -I nixos-config=./size-test/base.nix -A config.system.build.ipxeBootDir
|
||||||
```
|
```
|
||||||
|
|
||||||
and boot off of `./result/netboot.ipxe`. The initial build may take
|
4. boot off of `./result/netboot.ipxe`.
|
||||||
a few minutes, but subsequent builds will only take a few seconds.
|
|
||||||
|
The initial build may take a few minutes, but subsequent builds will
|
||||||
|
only take a few seconds.
|
||||||
|
|
||||||
## Setting up recursive nix
|
## Setting up recursive nix
|
||||||
|
|
||||||
@ -44,3 +31,12 @@ Setting up recursive Nix requires support on the build machine:
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## How it works
|
||||||
|
`./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.
|
||||||
|
|
||||||
|
The `./size-test/build.sh` test is able to build an incremental
|
||||||
|
netboot image in just 12 seconds, and the initrd is not rebuilt.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user