on master help sign in
Always include zellij and fix stale doc references
commit590e716f209239871f0233a657c7f8e12913b524 authoriko <mail@iko.soy> dateSun 28 Jun 2026, 09:22 (3 months ago) parentd1b5b46
2 files changed+11−10
README.md+3−4 flake.nix+8−6
README.md+3−4
@@ -34,7 +34,6 @@ is **required**; there is no default set.
3434```nix
3535# ./container.nix
3636{ pkgs, nur }: with pkgs; [
37− coreutils
3837 git
3938 go
4039 nur.repos.charmbracelet.crush
@@ -42,9 +41,9 @@ is **required**; there is no default set.
4241```
4342
4443Your **host login shell** (detected by `c init`, bash fallback), **coreutils**,
45−**Nix** itself (with CA certs and `nix-command`/`flakes` enabled, single-user),
46−and the ncurses **terminfo** database are always included — no need to list them.
47−`c start` launches [`zellij`](https://zellij.dev), so include it in `container.nix`.
44+[**zellij**](https://zellij.dev) (the session `c start` launches), **Nix** itself
45+(with CA certs and `nix-command`/`flakes` enabled, single-user), and the ncurses
46+**terminfo** database are always included — no need to list them.
4847
4948Point at a different file with `-c`/`--config`:
5049
flake.nix+8−6
@@ -117,6 +117,8 @@
117117 # The terminfo database (+ tput/clear/reset) so TUIs find the
118118 # entry for whatever TERM `c` passes in and render correctly.
119119 pkgsLinux.ncurses
120+ # The session `c start` always launches.
121+ pkgsLinux.zellij
120122 ];
121123 # Link all of /etc so the above files (nsswitch.conf, protocols,
122124 # services, passwd, group, ssl certs) are present.
@@ -160,7 +162,7 @@
160162
161163 # `nix run . -- init|start` runs the bundled `c` manager script. Its
162164 # `init` builds the image from the project's `container.nix` (via
163− # `lib.copyWith`); the script finds the flake from its own (store)
165+ # `lib.copyWithShell`); the script finds the flake from its own (store)
164166 # location, so this works from a checkout or straight from
165167 # `nix run github:…/nix-container`.
166168 cApp = pkgsHost.writeShellScriptBin "c" ''
@@ -173,15 +175,15 @@
173175 default = flake-utils.lib.mkApp { drv = cApp; };
174176 };
175177
176− # Build helpers. `c init` uses `copyWith` to honour a per-project
177− # `container.nix`:
178+ # Build helpers honour a per-project `container.nix`. `c init` uses
179+ # `copyWithShell` (host shell baked in); `copyWith` is the generic form:
178180 # (builtins.getFlake "github:…/nix-container")
179181 # .lib.<system>.copyWith (import ./container.nix)
180182 lib = {
181183 inherit mkImage;
182− # skopeo copy app (`skopeo copy nix:<image> "$@"`) for an image built
183− # from a `{ pkgs, nur }: [ ... ]` function. Defaults the shell (cmd +
184− # $SHELL) to bash; use `copyWithShell` to pick another.
184+ # Build the image's `copyTo` script (a skopeo-copy wrapper) from a
185+ # `{ pkgs, nur }: [ ... ]` function. Defaults the shell (cmd + $SHELL)
186+ # to bash; use `copyWithShell` to pick another.
185187 copyWith = packages: (mkImage "bash" packages).copyTo;
186188 # Like `copyWith`, but for the named shell — `c init` passes the host
187189 # login shell, which is added to the image and used as cmd + $SHELL