diff --git a/docs/content/en-US/menu.adoc b/docs/content/en-US/menu.adoc index 08012da0..2cfb4e9a 100644 --- a/docs/content/en-US/menu.adoc +++ b/docs/content/en-US/menu.adoc @@ -16,6 +16,7 @@ * NixOS modules ** link:{{< relref "./nixos-modules/profiles" >}}[Profiles] ** link:{{< relref "./nixos-modules/workflows" >}}[Workflows] +** link:{{< relref "./nixos-modules/disko" >}}[disko] * link:{{< relref "./using-parts-of-my-configuration" >}}[Using parts of my configuration] diff --git a/docs/content/en-US/nixos-modules/disko/index.adoc b/docs/content/en-US/nixos-modules/disko/index.adoc new file mode 100644 index 00000000..8d50317a --- /dev/null +++ b/docs/content/en-US/nixos-modules/disko/index.adoc @@ -0,0 +1,24 @@ +--- +title: disko +--- += disko + +This configuration uses github:nix-community/disko[opts=repo] extensively for creating them filesystem configurations and automating them filesystem partitioning. +Take note this should be only declared for hosts with the format `iso` (or without the format) as mentioned from xref:../../project-specific-setup/declarative-host-management/index.adoc[Declarative host management]. + +They are declared in the `disko.nix` at the host root which they are then imported into `disko.devices` attribute. +Here's an example configuration for my desktop workstation. + +[#lst:desktop-disko-config] +.`./hosts/ni/disko.nix` +[source, nix] +---- +include::../../../../../hosts/ni/disko.nix[] +---- + +Take note the disko NixOS module already handles NixOS filesystem configuration (i.e., `fileSystems.`) so if you have already have an existing hardware configuration, you have to delete it to prevent conflicting fstab configuration. + +Another thing to take notice is disko is mostly intended for fresh systems. +Migrating your already existing systems with disko can be problematic. +In the <>, the order of the declared partitions should match with the initial order when you manually partitioned the system. +If you cannot deal with it, reinstalling the system will help you there.