Skip to content

just vm: fetch nix-config's full history when the submodule is shallow - #104

Merged
h0ffmann merged 1 commit into
mainfrom
claude/vm-unshallow-nix-config
Oct 12, 2026
Merged

h0ffmann merged 1 commit into
mainfrom
claude/vm-unshallow-nix-config

Conversation

@h0ffmann

Copy link
Copy Markdown
Owner

Summary Before: just vm failed with "'/…/ww3-gpu/nix-config' is a shallow Git repository, so 'revCount' is not available", because .gitmodules checks nix-config out shallow and nix refuses a shallow git checkout as a flake. After: _nix-config-full runs git -C nix-config fetch --unshallow once when the submodule is shallow, and just vm builds.

Tested in a scratch superproject with nix-config as a --depth 1 submodule from GitHub: just _nix-config-full unshallowed it, a second run printed nothing, nix eval .#nixosConfigurations.nixos.config.system.build.vm.name gave nixos-vm; just --list parses
Cost none

What changed

🤖 Generated with Claude Code

https://claude.ai/code/session_01KxFd8xekxhf5MDQNB7tdQz


Generated by Claude Code

`.gitmodules` checks nix-config out shallow, and nix refuses a shallow git
checkout as a flake ("'revCount' is not available"), so `just vm` failed
even after #103 lifted the sparse checkout. `_nix-config-full` now runs
`git -C nix-config fetch --unshallow` when the submodule is shallow; the
next run sees a full clone and does nothing. nix-config#78 makes its own
recipes accept a shallow checkout too, but that only reaches here with a
pin bump.

Tested: in a scratch superproject with nix-config added as a --depth 1 submodule from GitHub, `just _nix-config-full` unshallowed it (is-shallow-repository false), a second run printed nothing, and `nix eval .#nixosConfigurations.nixos.config.system.build.vm.name` gave nixos-vm; `just --list` parses
Cost: none
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KxFd8xekxhf5MDQNB7tdQz
@h0ffmann
h0ffmann merged commit 846f5b1 into main Oct 12, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants