2023-05-09 14:50:12 +00:00
|
|
|
# Reference Manual: disko
|
|
|
|
|
|
|
|
## Module Options
|
|
|
|
|
2023-09-25 09:25:40 +00:00
|
|
|
We are currently having issues being able to generate proper module option
|
2023-09-15 05:56:40 +00:00
|
|
|
documentation for our recursive disko types. However you can read the available
|
|
|
|
options [here](https://github.com/nix-community/disko/tree/master/lib/types).
|
2024-05-12 08:18:13 +00:00
|
|
|
Combined with the
|
2023-09-15 05:56:40 +00:00
|
|
|
[examples](https://github.com/nix-community/disko/tree/master/example) this
|
|
|
|
hopefully gives you an overview.
|
2023-05-09 14:50:12 +00:00
|
|
|
|
|
|
|
## Command Line Options
|
|
|
|
|
|
|
|
```
|
2023-09-15 05:53:30 +00:00
|
|
|
Usage: ./disko [options] disk-config.nix
|
|
|
|
or ./disko [options] --flake github:somebody/somewhere#disk-config
|
|
|
|
|
|
|
|
With flakes, disk-config is discovered first under the .diskoConfigurations top level attribute
|
|
|
|
or else from the disko module of a NixOS configuration of that name under .nixosConfigurations.
|
|
|
|
|
2023-05-09 14:50:12 +00:00
|
|
|
Options:
|
2023-09-15 05:53:30 +00:00
|
|
|
|
2023-05-09 14:50:12 +00:00
|
|
|
* -m, --mode mode
|
2024-10-18 20:57:34 +00:00
|
|
|
set the mode, either distroy, format, mount, format,mount or destroy,format,mount
|
|
|
|
destroy: unmount filesystems and destroy partition tables of the selected disks
|
|
|
|
format: create partition tables, zpools, lvms, raids and filesystems if they don't exist yet
|
|
|
|
mount: mount the partitions at the specified root-mountpoint
|
|
|
|
format,mount: run format and mount in sequence
|
|
|
|
destroy,format,mount: run all three modes in sequence. Previously known as --mode disko
|
2023-05-09 14:50:12 +00:00
|
|
|
* -f, --flake uri
|
|
|
|
fetch the disko config relative to this flake's root
|
|
|
|
* --arg name value
|
|
|
|
pass value to nix-build. can be used to set disk-names for example
|
|
|
|
* --argstr name value
|
|
|
|
pass value to nix-build as string
|
2023-09-15 05:53:30 +00:00
|
|
|
* --root-mountpoint /some/other/mnt
|
|
|
|
where to mount the device tree (default: /mnt)
|
2023-05-09 14:50:12 +00:00
|
|
|
* --dry-run
|
|
|
|
just show the path to the script instead of running it
|
2023-09-15 05:53:30 +00:00
|
|
|
* --no-deps
|
|
|
|
avoid adding another dependency closure to an in-memory installer
|
|
|
|
requires all necessary dependencies to be available in the environment
|
2023-05-09 14:50:12 +00:00
|
|
|
* --debug
|
|
|
|
run with set -x
|
2024-10-22 21:05:22 +00:00
|
|
|
* --yes-wipe-all-disks
|
|
|
|
skip the safety check for destroying partitions, useful for automation
|
2023-05-09 14:50:12 +00:00
|
|
|
```
|