on master help sign in
Prepare for public release: add MIT LICENSE, untrack build artifact, generalize docs
commit3c7da732a428560c14274cd3946b69539cb02518 authoriko <mail@iko.soy> dateSat 27 Jun 2026, 20:28 (3 months ago) parentb1aa805
4 files changed+48−9
LICENSE+21 README.md+25−6 flake.nix+2−2 result−1
LICENSEnew file+21
@@ -0,0 +1,21 @@
1+MIT License
2+
3+Copyright (c) 2026 iko
4+
5+Permission is hereby granted, free of charge, to any person obtaining a copy
6+of this software and associated documentation files (the "Software"), to deal
7+in the Software without restriction, including without limitation the rights
8+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+copies of the Software, and to permit persons to whom the Software is
10+furnished to do so, subject to the following conditions:
11+
12+The above copyright notice and this permission notice shall be included in all
13+copies or substantial portions of the Software.
14+
15+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+SOFTWARE.
README.md+25−6
@@ -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).
flake.nix+2−2
@@ -78,8 +78,8 @@
7878 imageName = "nixos-container";
7979 imageTag = "latest";
8080
81− # Fish prompt config, copied from smol-nix's mkSmol.nix. Installed at
82− # /root/.config/fish/config.fish (fish reads $HOME/.config/fish).
81+ # Fish prompt config, installed at /root/.config/fish/config.fish
82+ # (fish reads $HOME/.config/fish).
8383 fishConfig = pkgsLinux.writeText "config.fish" ''
8484 # No welcome banner.
8585 set -g fish_greeting
resultdeleted−1
@@ -1 +0,0 @@
1−/nix/store/04m5crcxpbg3fhyzsf8152xl8693qyyi-image-nixos-container.json