mirror of
https://github.com/numtide/nixos-anywhere.git
synced 2024-10-26 12:57:16 +03:00
reformat with prettier
This commit is contained in:
parent
15df821835
commit
733ca7be85
41
README.md
41
README.md
@ -2,11 +2,12 @@
|
||||
|
||||
<img src="https://raw.githubusercontent.com/numtide/nixos-anywhere/5bdd3f3c442b923813e301b319290305353a3e7a/docs/logo.png" width="256" height="256">
|
||||
|
||||
nixos-anywhere (formally known as nixos-remote) makes it possible to install nixos from Linux machines reachable via ssh.
|
||||
Under the hood uses a [kexec image](https://github.com/nix-community/nixos-images#kexec-tarballs) to boot
|
||||
into a NixOS installer from a running Linux system.
|
||||
It then uses [disko](https://github.com/nix-community/disko) to partition and
|
||||
format the disks on the target system before it installs the user provided nixos
|
||||
nixos-anywhere (formally known as nixos-remote) makes it possible to install
|
||||
nixos from Linux machines reachable via ssh. Under the hood uses a
|
||||
[kexec image](https://github.com/nix-community/nixos-images#kexec-tarballs) to
|
||||
boot into a NixOS installer from a running Linux system. It then uses
|
||||
[disko](https://github.com/nix-community/disko) to partition and format the
|
||||
disks on the target system before it installs the user provided nixos
|
||||
configuration.
|
||||
|
||||
## Requirements
|
||||
@ -20,16 +21,21 @@ If your system is not booted into a nixos installer than the following
|
||||
requirements apply for kexec to succeed:
|
||||
|
||||
- x86_64 Linux system with kexec support (most x86_64 machine do have kexec
|
||||
support) or you have to provide your own [image](https://github.com/numtide/nixos-anywhere#using-your-own-kexec-image)
|
||||
support) or you have to provide your own
|
||||
[image](https://github.com/numtide/nixos-anywhere#using-your-own-kexec-image)
|
||||
- At least 2.5GB RAM (swap does not count). If you do not have enough RAM you
|
||||
will see failures unpacking the initrd), this is because kexec needs to load
|
||||
the whole nixos into memory.
|
||||
|
||||
## Usage
|
||||
Needs a repo with your configurations with flakes. For a minimal example checkout https://github.com/numtide/nixos-anywhere-examples.
|
||||
|
||||
Your NixOS configuration will also need a [disko](https://github.com/nix-community/disko) configuration as we can see in
|
||||
our [example](https://github.com/numtide/nixos-anywhere-examples/blob/9768e438b1467ec55d42e096860e7199bd1ef43d/flake.nix#L15-L19)
|
||||
Needs a repo with your configurations with flakes. For a minimal example
|
||||
checkout https://github.com/numtide/nixos-anywhere-examples.
|
||||
|
||||
Your NixOS configuration will also need a
|
||||
[disko](https://github.com/nix-community/disko) configuration as we can see in
|
||||
our
|
||||
[example](https://github.com/numtide/nixos-anywhere-examples/blob/9768e438b1467ec55d42e096860e7199bd1ef43d/flake.nix#L15-L19)
|
||||
|
||||
Afterwards you can just run:
|
||||
|
||||
@ -41,7 +47,8 @@ The parameter passed to `--flake` should point to your nixos configuration
|
||||
exposed in your flake (`nixosConfigurations.your-system` in the example above).
|
||||
|
||||
`nixos-anywhere --help`
|
||||
``` shell
|
||||
|
||||
```shell
|
||||
Usage: nixos-anywhere [options] ssh-host
|
||||
|
||||
Options:
|
||||
@ -76,10 +83,12 @@ Options:
|
||||
|
||||
## Using your own kexec image
|
||||
|
||||
By default `nixos-anywhere` will download the kexec image from [here](https://github.com/nix-community/nixos-images#kexec-tarballs).
|
||||
It is also possible to provide your own by providing a file to `--kexec`. The image will than uploaded prior to executing.
|
||||
By default `nixos-anywhere` will download the kexec image from
|
||||
[here](https://github.com/nix-community/nixos-images#kexec-tarballs). It is also
|
||||
possible to provide your own by providing a file to `--kexec`. The image will
|
||||
than uploaded prior to executing.
|
||||
|
||||
``` shell
|
||||
```shell
|
||||
nixos-anywhere \
|
||||
--kexec "$(nix build --print-out-paths github:nix-community/nixos-images#packages.x86_64-linux.kexec-installer-nixos-unstable)/nixos-kexec-installer-x86_64-linux.tar.gz" \
|
||||
--flake 'github:your-user/your-repo#your-system' \
|
||||
@ -87,10 +96,10 @@ nixos-anywhere \
|
||||
```
|
||||
|
||||
`--kexec` can be useful for example for aarch64-linux, where there is no
|
||||
pre-build image. The following example assumes that your local machine can
|
||||
build for aarch64-linux either natively or through a remote builder
|
||||
pre-build image. The following example assumes that your local machine can build
|
||||
for aarch64-linux either natively or through a remote builder
|
||||
|
||||
``` shell
|
||||
```shell
|
||||
nixos-anywhere \
|
||||
--kexec "$(nix build --print-out-paths github:nix-community/nixos-images#packages.aarch64-linux.kexec-installer-nixos-unstable)/nixos-kexec-installer-aarch64-linux.tar.gz" \
|
||||
--flake 'your-flake#your-system' \
|
||||
|
Loading…
Reference in New Issue
Block a user