[PATCH 22/22] Documentation: add how-to guide for Nix-built VMs

Alyssa Ross
2022-10-10T23:33:09Z

Documentation/nix-vms.adoc | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
create mode 100644 Documentation/nix-vms.adoc

diff --git a/Documentation/nix-vms.adoc b/Documentation/nix-vms.adoc
new file mode 100644
index 0000000..bbfa913
--- /dev/null
+++ b/Documentation/nix-vms.adoc
@@ -0,0 +1,22 @@
+= Managing VMs with Nix
+:page-parent: How-to Guides
+
+// SPDX-FileCopyrightText: 2022 Alyssa Ross <hi@alyssa.is>
+// SPDX-License-Identifier: GFDL-1.3-no-invariants-or-later OR CC-BY-SA-4.0
+
+VMs in a Spectrum system can optionally be managed with
+https://nixos.org/[Nix], a functional package manager.
+
+To create a VM with Nix:
+
+. Define your VM in vm-config/vms.nix on the
+xref:user-partition.adoc[user data partition].
++
+TIP: Supported settings for VM configuration are documented in
+xref:creating-vms.adoc[Creating VMs]. A Nix helper function called
+https://spectrum-os.org/git/spectrum/tree/vm-lib/make-vm.nix[`makeVm`]
+is provided for creating VM configuration directories with Nix.
+. Start the appvm-nix VM (provided by default), and run `vm-rebuild
+switch` in its console.
+. Reboot the Spectrum host system. (In future, this step will not be
+required.)
--
2.37.1