···62$ sudo launchctl kickstart -k system/org.nixos.nix-daemon
63```
6465-## Example flake usage
6667```
68{
···120}
121```
122123-## Reconfiguring the builder
124125Initially you should not change the builder configuration else you will not be
126able to use the binary cache. However, after you have the builder running locally
···62$ sudo launchctl kickstart -k system/org.nixos.nix-daemon
63```
6465+## Example flake usage {#sec-darwin-builder-example-flake}
6667```
68{
···120}
121```
122123+## Reconfiguring the builder {#sec-darwin-builder-reconfiguring}
124125Initially you should not change the builder configuration else you will not be
126able to use the binary cache. However, after you have the builder running locally
+9-9
doc/builders/special/vm-tools.section.md
···67A bash script fragment that produces a disk image at `destination`.
89-### Attributes
1011* `size`. The disk size, in MiB.
12* `fullName`. Name that will be written to `${destination}/nix-support/full-name`.
···2021If the build fails and Nix is run with the `-K/--keep-failed` option, a script `run-vm` will be left behind in the temporary build directory that allows you to boot into the VM and debug it interactively.
2223-### Attributes
2425* `preVM` (optional). Shell command to be evaluated *before* the VM is started (i.e., on the host).
26* `memSize` (optional, default `512`). The memory size of the VM in MiB.
27* `diskImage` (optional). A file system image to be attached to `/dev/sda`.
28 Note that currently we expect the image to contain a filesystem, not a full disk image with a partition table etc.
2930-### Examples
3132Build the derivation hello inside a VM:
33```nix
···5657Takes a file, such as an ISO, and extracts its contents into the store.
5859-### Attributes
6061* `file`. Path to the file to be extracted.
62 Note that currently we expect the image to contain a filesystem, not a full disk image with a partition table etc.
63* `fs` (optional). Filesystem of the contents of the file.
6465-### Examples
6667Extract the contents of an ISO file:
68```nix
···8283Generate a script that can be used to run an interactive session in the given image.
8485-### Examples
8687Create a script for running a Fedora 27 VM:
88```nix
···100101A set of functions that build a predefined set of minimal Linux distributions images.
102103-### Images
104105* Fedora
106 * `fedora26x86_64`
···126 * `debian11i386`
127 * `debian11x86_64`
128129-### Attributes
130131* `size` (optional, defaults to `4096`). The size of the image, in MiB.
132* `extraPackages` (optional). A list names of additional packages from the distribution that should be included in the image.
133134-### Examples
1351368GiB image containing Firefox in addition to the default packages:
137```nix
···67A bash script fragment that produces a disk image at `destination`.
89+### Attributes {#vm-tools-createEmptyImage-attributes}
1011* `size`. The disk size, in MiB.
12* `fullName`. Name that will be written to `${destination}/nix-support/full-name`.
···2021If the build fails and Nix is run with the `-K/--keep-failed` option, a script `run-vm` will be left behind in the temporary build directory that allows you to boot into the VM and debug it interactively.
2223+### Attributes {#vm-tools-runInLinuxVM-attributes}
2425* `preVM` (optional). Shell command to be evaluated *before* the VM is started (i.e., on the host).
26* `memSize` (optional, default `512`). The memory size of the VM in MiB.
27* `diskImage` (optional). A file system image to be attached to `/dev/sda`.
28 Note that currently we expect the image to contain a filesystem, not a full disk image with a partition table etc.
2930+### Examples {#vm-tools-runInLinuxVM-examples}
3132Build the derivation hello inside a VM:
33```nix
···5657Takes a file, such as an ISO, and extracts its contents into the store.
5859+### Attributes {#vm-tools-extractFs-attributes}
6061* `file`. Path to the file to be extracted.
62 Note that currently we expect the image to contain a filesystem, not a full disk image with a partition table etc.
63* `fs` (optional). Filesystem of the contents of the file.
6465+### Examples {#vm-tools-extractFs-examples}
6667Extract the contents of an ISO file:
68```nix
···8283Generate a script that can be used to run an interactive session in the given image.
8485+### Examples {#vm-tools-makeImageTestScript-examples}
8687Create a script for running a Fedora 27 VM:
88```nix
···100101A set of functions that build a predefined set of minimal Linux distributions images.
102103+### Images {#vm-tools-diskImageFuns-images}
104105* Fedora
106 * `fedora26x86_64`
···126 * `debian11i386`
127 * `debian11x86_64`
128129+### Attributes {#vm-tools-diskImageFuns-attributes}
130131* `size` (optional, defaults to `4096`). The size of the image, in MiB.
132* `extraPackages` (optional). A list names of additional packages from the distribution that should be included in the image.
133134+### Examples {#vm-tools-diskImageFuns-examples}
1351368GiB image containing Firefox in addition to the default packages:
137```nix