aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md38
1 files changed, 19 insertions, 19 deletions
diff --git a/README.md b/README.md
index f9e32de..66e9ed1 100644
--- a/README.md
+++ b/README.md
@@ -25,7 +25,7 @@ In the host's NixOS configuration:
```nix
imports = [
- (import /path/to/firecracker/modules/host { users = { tv = 8; alice = 2; }; })
+ (import /path/to/rigs/modules/host { users = { tv = 8; alice = 2; }; })
];
```
@@ -76,8 +76,8 @@ tcp 10080 (the checks).
## Running a VM
```sh
-nix-build pkgs/run-firecracker-vm
-./result/bin/run-firecracker-vm
+nix-build pkgs/run-rig
+./result/bin/run-rig
```
The guest's console (the run script's terminal) shows the kernel's and
@@ -88,7 +88,7 @@ needs a password). It's small, so rather than a layer, with an image,
of its own, import it into another layer:
```nix
-{ imports = [ /path/to/firecracker/layers/console.nix ]; }
+{ imports = [ /path/to/rigs/layers/console.nix ]; }
```
(As a layer of its own, it works, too: `--arg layers '[ layers/console.nix ]'`.)
@@ -106,7 +106,7 @@ nix layer, preferably first, so its image is the same for all guests
with nix (see layers below):
```sh
-nix-build pkgs/run-firecracker-vm --arg layers '[ layers/nix.nix ./my-service.nix ]'
+nix-build pkgs/run-rig --arg layers '[ layers/nix.nix ./my-service.nix ]'
```
What nix in such a guest adds to the store goes to a disk of its own,
@@ -114,7 +114,7 @@ which the run script then requires (and refuses for a guest without nix,
like `--nixpkgs` and `--nixpkgs-cache`, below):
```sh
-./result/bin/run-firecracker-vm --store ~/fc-store.img [--store-size 50G]
+./result/bin/run-rig --store ~/fc-store.img [--store-size 50G]
```
The file gets created (sparse, default 16G) if it doesn't exist. Only one
@@ -123,7 +123,7 @@ unless given a disk of its own, which works the same way (kept apart
from the store, so either can be kept or thrown away):
```sh
-./result/bin/run-firecracker-vm --home ~/fc-home.img [--home-size 50G]
+./result/bin/run-rig --home ~/fc-home.img [--home-size 50G]
```
For a faster development loop, a guest with nix can switch to a new
@@ -132,7 +132,7 @@ into a layer. Build the system with the same arguments as the guest,
and switch to it:
```sh
-sys=$(nix-build --no-out-link pkgs/run-firecracker-vm -A toplevel --arg layers '[ layers/nix.nix ./my-service.nix ]')
+sys=$(nix-build --no-out-link pkgs/run-rig -A toplevel --arg layers '[ layers/nix.nix ./my-service.nix ]')
ssh root@VM $sys/bin/switch-to-configuration test
```
@@ -189,9 +189,9 @@ ssh_host_ed25519_key=FILE` (an ed25519 private key without passphrase).
With the same one for all your guests, one known_hosts line does:
```sh
-ssh-keygen -t ed25519 -N "" -f ~/.local/share/run-firecracker-vm/ssh_host_ed25519_key
-echo "172.16.0.*,fdfc:fc::* $(cut -d' ' -f1,2 ~/.local/share/run-firecracker-vm/ssh_host_ed25519_key.pub)" >> ~/.ssh/known_hosts
-./result/bin/run-firecracker-vm --secret ssh_host_ed25519_key=$HOME/.local/share/run-firecracker-vm/ssh_host_ed25519_key
+ssh-keygen -t ed25519 -N "" -f ~/.local/share/run-rig/ssh_host_ed25519_key
+echo "172.16.0.*,fdfc:fc::* $(cut -d' ' -f1,2 ~/.local/share/run-rig/ssh_host_ed25519_key.pub)" >> ~/.ssh/known_hosts
+./result/bin/run-rig --secret ssh_host_ed25519_key=$HOME/.local/share/run-rig/ssh_host_ed25519_key
```
Who may log in goes in a layer, e.g.:
@@ -216,7 +216,7 @@ and the run script, which doesn't start the guest without them, gets
them with `--secret NAME=FILE` (FILE read once, so a pipe will do):
```sh
-./result/bin/run-firecracker-vm --secret hermes.env=<(pass show hermes/env)
+./result/bin/run-rig --secret hermes.env=<(pass show hermes/env)
```
They're only that guest's, and only in its memory (`/run`), until it
@@ -227,7 +227,7 @@ The guest's system can be built in layers, each a NixOS module on top of
the ones before (the first on top of the base system):
```sh
-nix-build pkgs/run-firecracker-vm --arg layers '[ ./base-tools.nix ./my-service.nix ]'
+nix-build pkgs/run-rig --arg layers '[ ./base-tools.nix ./my-service.nix ]'
```
The guest runs the top layer's system. Each layer gets its own image,
@@ -244,7 +244,7 @@ image. So to use a cut-down kernel, based on Firecracker's recommended
guest configuration, instead of `linuxPackages_latest`:
```sh
-nix-build pkgs/run-firecracker-vm \
+nix-build pkgs/run-rig \
--arg base '[ base/kernel.nix ]'
```
@@ -253,7 +253,7 @@ cryptsetup, TPM2, FIDO2, journal-remote, ...), built from source, with
dbus and dbus-broker against it:
```sh
-nix-build pkgs/run-firecracker-vm \
+nix-build pkgs/run-rig \
--arg base '[ base/kernel.nix base/systemd.nix ]'
```
@@ -285,8 +285,8 @@ named like the VM, else (no name) `default`:
```sh
fc-egress -l box allow https://cache.nixos.org
-./result/bin/run-firecracker-vm --name box # list box
-./result/bin/run-firecracker-vm --name box2 --egress box # list box, too
+./result/bin/run-rig --name box # list box
+./result/bin/run-rig --name box2 --egress box # list box, too
fc-egress vms # running VMs: tap (as in the log), address, name, list
fc-egress -v box allow https://example.org # the list box uses
fc-egress use box default # switch box to another list
@@ -333,8 +333,8 @@ the list its own VM uses.
## Layout
-- `pkgs/run-firecracker-vm/default.nix`: the guest's NixOS configuration,
- the Firecracker configuration, and the `run-firecracker-vm` script.
+- `pkgs/run-rig/default.nix`: the guest's NixOS configuration,
+ the Firecracker configuration, and the `run-rig` script.
- `base/kernel.nix`: the cut-down kernel, for `base`.
- `base/systemd.nix`: a slimmer systemd, for `base`.
- `layers/nix.nix`: nix, as a layer.