Skip to content

Commit c3326a4

Browse files
committed
rename nixos-remote to nixos-anywhere
1 parent 6fdd010 commit c3326a4

15 files changed

+44
-44
lines changed

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# nixos-remote - install nixos everywhere via ssh
1+
# nixos-anywhere - install nixos everywhere via ssh
22

3-
nixos-remote makes it possible to install nixos from Linux machines reachable via ssh.
3+
nixos-anywhere (formally known as nixos-remote) makes it possible to install nixos from Linux machines reachable via ssh.
44
Under the hood uses a [kexec image](https://github.com/nix-community/nixos-images#kexec-tarballs) to boot
55
into a NixOS installer from a running Linux system.
66
It then uses [disko](https://github.com/nix-community/disko) to partition and
@@ -15,23 +15,23 @@ configuration.
1515
the whole nixos into memory.
1616

1717
## Usage
18-
Needs a repo with your configurations with flakes. For a minimal example checkout https://github.com/numtide/nixos-remote-examples.
18+
Needs a repo with your configurations with flakes. For a minimal example checkout https://github.com/numtide/nixos-anywhere-examples.
1919

2020
Your NixOS configuration will also need a [disko](https://github.com/nix-community/disko) configuration as we can see in
21-
our [example](https://github.com/numtide/nixos-remote-examples/blob/9768e438b1467ec55d42e096860e7199bd1ef43d/flake.nix#L15-L19)
21+
our [example](https://github.com/numtide/nixos-anywhere-examples/blob/9768e438b1467ec55d42e096860e7199bd1ef43d/flake.nix#L15-L19)
2222

2323
Afterwards you can just run:
2424

2525
```
26-
nix run github:numtide/nixos-remote -- root@yourip --flake github:your-user/your-repo#your-system
26+
nix run github:numtide/nixos-anywhere -- root@yourip --flake github:your-user/your-repo#your-system
2727
```
2828

2929
The parameter passed to `--flake` should point to your nixos configuration
3030
exposed in your flake (`nixosConfigurations.your-system` in the example above).
3131

32-
`nixos-remote --help`
32+
`nixos-anywhere --help`
3333
``` shell
34-
Usage: nixos-remote [options] ssh-host
34+
Usage: nixos-anywhere [options] ssh-host
3535

3636
Options:
3737

@@ -65,11 +65,11 @@ Options:
6565
6666
## Using your own kexec image
6767
68-
By default `nixos-remote` will download the kexec image from [here](https://github.com/nix-community/nixos-images#kexec-tarballs).
68+
By default `nixos-anywhere` will download the kexec image from [here](https://github.com/nix-community/nixos-images#kexec-tarballs).
6969
It is also possible to provide your own by providing a file to `--kexec`. The image will than uploaded prior to executing.
7070
7171
``` shell
72-
nixos-remote \
72+
nixos-anywhere \
7373
--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" \
7474
--flake 'github:your-user/your-repo#your-system' \
7575
root@yourip
@@ -80,15 +80,15 @@ pre-build image. The following example assumes that your local machine can
8080
build for aarch64-linux either natively or through a remote builder
8181
8282
``` shell
83-
nixos-remote \
83+
nixos-anywhere \
8484
--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" \
8585
--flake 'your-flake#your-system' \
8686
root@yourip
8787
```
8888
8989
## Developer guide
9090
91-
To run `nixos-remote` from the repo:
91+
To run `nixos-anywhere` from the repo:
9292
9393
```console
9494
nix run . -- --help

bors.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ status = [
88
"devShell default [x86_64-linux]",
99
"package default [x86_64-linux]",
1010
"package docs [x86_64-linux]",
11-
"package nixos-remote [x86_64-linux]"
11+
"package nixos-anywhere [x86_64-linux]"
1212
]

docs/SUMMARY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Table of Content
22

33
- [Introduction](./introduction.md)
4-
- [What is nixos-remote?](#)
4+
- [What is nixos-anywhere?](#)
55
- [Quickstart](#)
66
- [Getting Started](#)
77
- [System Requirements](#)

docs/book.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ authors = [ ]
33
language = "en"
44
multilingual = false
55
src = "."
6-
title = "nixos-remote - install NixOS everywhere"
6+
title = "nixos-anywhere - install NixOS everywhere"

docs/cli.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# CLI
22

33
```
4-
Usage: nixos-remote [options] ssh-host
4+
Usage: nixos-anywhere [options] ssh-host
55
66
Options:
77

docs/flake-module.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
perSystem = { pkgs, lib, ... }: {
3-
packages.docs = pkgs.runCommand "nixos-remote-docs"
3+
packages.docs = pkgs.runCommand "nixos-anywhere-docs"
44
{
55
passthru.serve = pkgs.writeShellScriptBin "serve" ''
66
cd docs

docs/introduction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Introduction
22

3-
- [What is nixos-remote?](#)
3+
- [What is nixos-anywhere?](#)
44
- [Quickstart](#)
55
- [Getting Started](#)
66
- [System Requirements](#)

src/default.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ let
2323
];
2424
in
2525
(writeShellApplication {
26-
name = "nixos-remote";
27-
text = builtins.readFile ./nixos-remote.sh;
26+
name = "nixos-anywhere";
27+
text = builtins.readFile ./nixos-anywhere.sh;
2828
inherit runtimeInputs;
2929
}) // {
3030
# also expose this attribute to other derivations

src/flake-module.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
perSystem = { config, pkgs, ... }: {
33
packages = {
4-
nixos-remote = pkgs.callPackage ./. { };
5-
default = config.packages.nixos-remote;
4+
nixos-anywhere = pkgs.callPackage ./. { };
5+
default = config.packages.nixos-anywhere;
66
};
77
devShells.default = pkgs.mkShellNoCC {
8-
packages = config.packages.nixos-remote.runtimeInputs;
8+
packages = config.packages.nixos-anywhere.runtimeInputs;
99
};
1010
};
1111
}

src/nixos-remote.sh renamed to src/nixos-anywhere.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
showUsage() {
22
cat <<USAGE
3-
Usage: nixos-remote [options] ssh-host
3+
Usage: nixos-anywhere [options] ssh-host
44
55
Options:
66
@@ -132,14 +132,14 @@ fi
132132

133133
# ssh wrapper
134134
timeout_ssh_() {
135-
timeout 10 ssh -i "$ssh_key_dir"/nixos-remote -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no "$ssh_connection" "$@"
135+
timeout 10 ssh -i "$ssh_key_dir"/nixos-anywhere -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no "$ssh_connection" "$@"
136136
}
137137
ssh_() {
138-
ssh -T -i "$ssh_key_dir"/nixos-remote -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no "$ssh_connection" "$@"
138+
ssh -T -i "$ssh_key_dir"/nixos-anywhere -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no "$ssh_connection" "$@"
139139
}
140140

141141
nix_copy() {
142-
NIX_SSHOPTS="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i $ssh_key_dir/nixos-remote" nix copy \
142+
NIX_SSHOPTS="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i $ssh_key_dir/nixos-anywhere" nix copy \
143143
"${nix_options[@]}" \
144144
"${nix_copy_options[@]}" \
145145
"$@"
@@ -156,11 +156,11 @@ if [[ -z ${ssh_connection-} ]]; then
156156
abort "ssh-host must be set"
157157
fi
158158

159-
# we generate a temporary ssh keypair that we can use during nixos-remote
159+
# we generate a temporary ssh keypair that we can use during nixos-anywhere
160160
ssh_key_dir=$(mktemp -d)
161161
trap 'rm -rf "$ssh_key_dir"' EXIT
162162
mkdir -p "$ssh_key_dir"
163-
ssh-keygen -t ed25519 -f "$ssh_key_dir"/nixos-remote -P "" -C "nixos-remote" >/dev/null
163+
ssh-keygen -t ed25519 -f "$ssh_key_dir"/nixos-anywhere -P "" -C "nixos-anywhere" >/dev/null
164164

165165
# parse flake nixos-install style syntax, get the system attr
166166
if [[ -n ${flake-} ]]; then
@@ -198,7 +198,7 @@ fi
198198

199199
until
200200
ssh-copy-id \
201-
-i "$ssh_key_dir"/nixos-remote.pub \
201+
-i "$ssh_key_dir"/nixos-anywhere.pub \
202202
-o ConnectTimeout=10 \
203203
-o UserKnownHostsFile=/dev/null \
204204
-o StrictHostKeyChecking=no \
@@ -255,7 +255,7 @@ if [[ ${is_os-n} != "Linux" ]]; then
255255
fi
256256

257257
if [[ ${is_arch-n} != "x86_64" ]] && [[ $kexec_url == "$default_kexec_url" ]]; then
258-
abort "The default kexec image only support x86_64 cpus. Checkout https://github.com/numtide/nixos-remote/#using-your-own-kexec-image for more information."
258+
abort "The default kexec image only support x86_64 cpus. Checkout https://github.com/numtide/nixos-anywhere/#using-your-own-kexec-image for more information."
259259
fi
260260

261261
if [[ ${is_kexec-n} == "n" ]] && [[ ${is_installer-n} == "n" ]]; then
@@ -298,7 +298,7 @@ ssh_ "$disko_script"
298298

299299
if [[ ${stop_after_disko-n} == "y" ]]; then
300300
# Should we also do this for `--no-reboot`?
301-
echo "WARNING: leaving temporary ssh key at '$ssh_key_dir/nixos-remote' to login to the machine" >&2
301+
echo "WARNING: leaving temporary ssh key at '$ssh_key_dir/nixos-anywhere' to login to the machine" >&2
302302
trap - EXIT
303303
exit 0
304304
fi

0 commit comments

Comments
 (0)