diff --git a/README.md b/README.md index c8e265f..1493ffa 100644 --- a/README.md +++ b/README.md @@ -57,11 +57,14 @@ affects `devenv shell`/`test`/`build`. Use the Nix flake template instead: ```sh mkdir ~/projects/newthing && cd ~/projects/newthing -nix flake init -t git+https://git.kilimanjaro.io/devkit +nix flake init --refresh -t git+https://git.kilimanjaro.io/devkit ``` (Local clone: `nix flake init -t path:/home/btburke/projects/devkit`.) +`--refresh` picks up the latest template commit; without it nix reuses the +cached branch ref for `tarball-ttl` (default 1h). `proj init` always passes it. + ## Fish shell helper `fish/functions/proj.fish` defines a `proj` function wrapping the scaffold: diff --git a/fish/functions/proj.fish b/fish/functions/proj.fish index 8434aa6..ff932d3 100644 --- a/fish/functions/proj.fish +++ b/fish/functions/proj.fish @@ -14,8 +14,10 @@ function proj --description 'Personal project helpers (devkit scaffold)' cd $argv[2]; or return 1 end echo "Initializing devkit project in "(pwd)"..." >&2 + # --refresh forces re-resolving the branch; without it nix reuses the + # cached ref for tarball-ttl (default 1h) and misses new template commits. command nix --extra-experimental-features 'nix-command flakes' \ - flake init -t $template + flake init --refresh -t $template or return 1 echo "Scaffold written. Next: devenv shell" >&2 case '*'