diff --git a/README.md b/README.md index e8a26d1..91a7396 100644 --- a/README.md +++ b/README.md @@ -63,9 +63,11 @@ data has been migrated. ## Prerequisites - Source Machine: -- - Can be any Linux machine with Nix installed, or a NixOS machine. -- Target Machine: +- - Can be any Linux machine with Nix installed, or a NixOS machine. + +- Target Machine: + - Unless you're using the option to boot from a NixOS installer image, or providing your own `kexec` image, it must be running x86-64 Linux with kexec support. Most `x86_64` Linux systems do have kexec support. By providing diff --git a/docs/INDEX.md b/docs/INDEX.md index 8446ae8..b033e37 100644 --- a/docs/INDEX.md +++ b/docs/INDEX.md @@ -1,17 +1,11 @@ -# Table of Content +# Table of Content: - nixos-anywhere -- [Introduction](./introduction.md) - - [What is nixos-anywhere?](#) - - [Quickstart](./quickstart.md) - - [Getting Started](#) - - [System Requirements](#) - - [Support Matrix](#) -- [Installation](./installation.md) - - [Bare Metal Platforms](#) - - [Virtualized Platforms](#) - - [Cloud Platforms](#) - - [Local Platforms](#) - - [Single Board Computers](#) -- [Avanced Guides](#) -- [Reference](#) - - [CLI](./cli.md) +***Install NixOS everywhere via ssh*** + + + +- [README](../README.md) +- [Quickstart](./quickstart.md) +- [System Requirements](./requirements.md) +- [Support Matrix](./supportmatrix.md) +- [Reference](./reference.md) diff --git a/docs/installation.md b/docs/installation.md deleted file mode 100644 index bbe2cb5..0000000 --- a/docs/installation.md +++ /dev/null @@ -1,7 +0,0 @@ -# Installation - -- [Bare Metal Platforms](#) -- [Virtualized Platforms](#) -- [Cloud Platforms](#) -- [Local Platforms](#) -- [Single Board Computers](#) diff --git a/docs/introduction.md b/docs/introduction.md deleted file mode 100644 index f2bf553..0000000 --- a/docs/introduction.md +++ /dev/null @@ -1,7 +0,0 @@ -# Introduction - -- [What is nixos-anywhere?](#) -- [Quickstart](#) -- [Getting Started](#) -- [System Requirements](#) -- [Support Matrix](#) diff --git a/docs/quickstart.md b/docs/quickstart.md index 669d571..9b1aafe 100644 --- a/docs/quickstart.md +++ b/docs/quickstart.md @@ -4,7 +4,7 @@ -## Inroduction +## Introduction This guide documents a simple installation of NixOS using **nixos-anywhere** on a target machine running x86_64 Linux with @@ -33,7 +33,7 @@ below. [Nixos Wiki](https://nixos.wiki/wiki/Flakes#enable-flakes) describes how to enable flakes. -1. In this directory, run the following command to create a flake. +2. In this directory, run the following command to create a flake. ``` nix flake init @@ -55,20 +55,20 @@ Substitute  the text that reads `CHANGE` with your own SSH key. This is important, otherwise you will not be able to log on to the target machine after NixOS has been installed. -3. In the same directory, create a file named `disk-config.nix`. This will be - used to specify the disk layout to the **disko** tool, which nixos-anywhere - uses to partition, format and mount the disks. Again, for a simple - installation you can paste the contents from the example - [here](https://github.com/numtide/nixos-anywhere-examples/blob/main/disk-config.nix). - This configures a standard GPT (GUID Partition Table) partition compatible - with both EFI and BIOS systems, and mounts the disk as `/dev/sda`. If this - doesn’t meet your requirements, choose an example that suits your disk - layout from the - [disko examples](https://github.com/nix-community/disko/tree/master/example). - For more information about this configuration, refer to the - [disko documentation.](https://github.com/nix-community/disko) +3. In the same directory, create a file named `disk-config.nix`. This will be + used to specify the disk layout to the **disko** tool, which nixos-anywhere + uses to partition, format and mount the disks. Again, for a simple + installation you can paste the contents from the example + [here](https://github.com/numtide/nixos-anywhere-examples/blob/main/disk-config.nix). + This configures a standard GPT (GUID Partition Table) partition compatible + with both EFI and BIOS systems, and mounts the disk as `/dev/sda`. If this + doesn’t meet your requirements, choose an example that suits your disk + layout from the + [disko examples](https://github.com/nix-community/disko/tree/master/example). + For more information about this configuration, refer to the + [disko documentation.](https://github.com/nix-community/disko) -4. Run the following command to create the `flake.lock` file: +4. Run the following command to create the `flake.lock` file: ``` nix flake lock @@ -78,21 +78,21 @@ Optionally, you can commit these files to a repo such as Github, or you can simply reference your local directory when you run **nixos-anywhere**. This example uses a local directory on the source machine. -5. On the target machine, make sure you have access as root via ssh by adding - your SSH key to the file `authorized_keys` in the directory `/root/.ssh` +5. On the target machine, make sure you have access as root via ssh by adding + your SSH key to the file `authorized_keys` in the directory `/root/.ssh` -6. You can now run **nixos-anywhere** from the command line as shown below, - where: - - - `` is the path to the directory or repository - containing `flake.nix` and `disk-config.nix` - - - `` must match the name that immediately follows the - text `nixosConfigurations.` in the flake, as indicated by the comment in - the - [example](https://github.com/numtide/nixos-anywhere-examples/blob/main/flake.nix)). - - - `` is the IP address of the target machine. +6. You can now run **nixos-anywhere** from the command line as shown below, + where: + + - `` is the path to the directory or repository + containing `flake.nix` and `disk-config.nix` + + - `` must match the name that immediately follows the + text `nixosConfigurations.` in the flake, as indicated by the comment in + the + [example](https://github.com/numtide/nixos-anywhere-examples/blob/main/flake.nix)). + + - `` is the IP address of the target machine. ``` nix run github:numtide/nixos-anywhere -- --flake # root@ diff --git a/docs/requirements.md b/docs/requirements.md new file mode 100644 index 0000000..ee4a4ae --- /dev/null +++ b/docs/requirements.md @@ -0,0 +1,14 @@ +# System Requirements: nixos-anywhere + +**_Install NixOS everywhere via ssh_** + + + +## + +- Source Machine: + - Can be any Linux or Mac computer with Nix installed, or a NixOS machine. +- Destination Machine: + - Must be an x86-64 machine + - Unless you're using the option to boot from a Nixos installer image, it must be running x86-64 Linux with kexec support . Most x86_64 Linux systems do have kexec support. + - Must have at least 2.5 GB of RAM, excluding swap. diff --git a/docs/supportmatrix.md b/docs/supportmatrix.md new file mode 100644 index 0000000..60147d3 --- /dev/null +++ b/docs/supportmatrix.md @@ -0,0 +1,25 @@ +# Support Matrix: nixos-anywhere + +**_Install NixOS everywhere via ssh_** + + + +We have verified that **nixos-anywhere** runs successfully on the platforms listed below. + +**kexec boot:**    Indicates whether it can work by using a kexec boot + +**Image boot:** Indicates it will work if booted from a NixOS installer + +**Own kexec:**     Indicates it will work if you supply your own kexec + +| **Platform** | **Operating System** | kexec boot | Image boot | Own kexec | +| ------------- | -------------------- | ---------- | ---------- | --------- | +| Hetzner Cloud | X86-64 Linux | Yes | Yes | Yes | +| | | | | | +| | | | | | +| | | | | | +| | | | | | +| | | | | | +| | | | | | + +##