@@ -1,7 +1,7 @@
1#!/usr/bin/env fish
1#!/usr/bin/env fish
2# Manage a container named after the current directory.
2# Manage a container named after the current directory.
3# c init [extra create args] build + load the image, then create the container
3# c init [extra create args] build + load the image, then create the container
4−# (uses ./nix-container.nix for packages if present)
4+# (uses ./container.nix for packages if present)
5# c start start it and attach
5# c start start it and attach
7set -l name (path basename $PWD)
7set -l name (path basename $PWD)
@@ -15,9 +15,9 @@ switch $argv[1]
15 set -l archive $tmp/image.tar.gz
15 set -l archive $tmp/image.tar.gz
16 set -l rc 0
16 set -l rc 0
18− if test -e nix-container.nix
18+ if test -e container.nix
19 # Per-project package set: build an image with exactly these packages.
19 # Per-project package set: build an image with exactly these packages.
20− set -lx NIX_CONTAINER_PKGS (path resolve nix-container.nix)
20+ set -lx NIX_CONTAINER_PKGS (path resolve container.nix)
21 set -l expr "(builtins.getFlake \"$flake\").lib.\${builtins.currentSystem}.copyWith (import (/. + builtins.getEnv \"NIX_CONTAINER_PKGS\"))"
21 set -l expr "(builtins.getFlake \"$flake\").lib.\${builtins.currentSystem}.copyWith (import (/. + builtins.getEnv \"NIX_CONTAINER_PKGS\"))"
22 set -l copyer (nix build --impure --no-link --print-out-paths --expr "$expr")
22 set -l copyer (nix build --impure --no-link --print-out-paths --expr "$expr")
23 set rc $status
23 set rc $status