@@ -12,17 +12,23 @@ prompt), and the image ships a handful of dev/LLM tools: `git`, `jujutsu`,
1212
1313## Prerequisites
1414
15−- Apple's `container` CLI installed, with services started:
16− `container system start` (first run downloads a Linux kernel).
17−- A **Linux builder** — the image *contents* are Linux binaries and can't be
18− built on macOS. `internal.iko.soy` (aarch64-linux) is already configured, so
19− `nix` dispatches to it automatically.
15+- [Nix](https://nixos.org/download/) with flakes enabled.
16+- Apple's [`container`](https://github.com/apple/container) CLI installed, with
17+ services started: `container system start` (first run downloads a Linux
18+ kernel).
19+- A **Linux builder** — the image *contents* are Linux binaries, which can't be
20+ built on macOS. Use a [remote builder][builders] or, on Apple Silicon, the
21+ `nix-darwin` `linux-builder`. With one configured, `nix` dispatches Linux
22+ builds to it automatically (most packages also come prebuilt from the binary
23+ cache, so the builder is only needed for the uncached bits).
24+
25+[builders]: https://nix.dev/manual/nix/latest/advanced-topics/distributed-builds
2026
2127## Steps
2228
2329### 1. Build the image archive
2430
25−`nix run` builds the Linux contents (on the remote builder) and writes a tagged
31+`nix run` builds the Linux contents (on your Linux builder) and writes a tagged
2632OCI archive locally via `skopeo`. Pass the output path; the image is tagged
2733`nixos-container:latest`.
2834
@@ -49,6 +55,15 @@ container start -ai nixos
4955
5056You land in `fish`. Exit the shell to stop the container.
5157
58+> **Shortcut:** the [`c`](./c) script wraps create/start and names the container
59+> after the current directory (handy for per-project containers):
60+>
61+> ```sh
62+> ./c init # create; append create args to add mounts, e.g.
63+> ./c init -v $PWD:/work # (mounts can only be set at creation time)
64+> ./c start # start and attach
65+> ```
66+
5267## Re-running after a rebuild
5368
5469`container` keeps the loaded image and the created container, so to pick up a
@@ -92,3 +107,7 @@ system maps to the matching Linux target automatically (an Intel Mac builds an
92107 single `nix run` produces a loadable archive.
93108- Apple's `container` runs each container in its own lightweight Linux VM and
94109 consumes standard OCI images — no `--privileged` or systemd needed.
110+
111+## License
112+
113+[MIT](./LICENSE).