Repository navigation
fix(install): scaffold direnv mode on the host without a container - #1873
Merged
Merged
Conversation
install.sh in direnv mode skips docker/podman detection and runs the pinned init-workspace.sh from the devkit flake source (nix flake metadata -> assets/, image bake steps replayed), like the drift check. devkit-upgrade.yml drops --docker for direnv repos. Container modes are unchanged. Refs: #1871
direnv mode defaults the version to the .vig-os pin or the newest release tag, runs init-workspace.sh inside the release's dev-shell with a clean environment (macOS-safe), and ignores --docker/--podman with a warning. The direnv smoke lane installs Nix first and drops the container workarounds. Refs: #1871
… nix Run nix develop from the scratch dir so its hooks never touch the caller's repo, pass the job token to nix in devkit-upgrade.yml, and note the pin behaviour of a direnv --force in the README. Refs: #1871
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
In direnv mode
install.sh(fresh scaffold and--forceupgrade) anddevkit-upgrade.ymlno longer need docker/podman.install.shskips runtime detection and runs the pinnedinit-workspace.shon the host from the devkit flake source (nix flake metadata->assets/, image bake steps replayed, scratch dir removed) — the same replay as the #1870 drift check.devkit-upgrade.ymldrops--dockerwhen.vig-ossaysDEVKIT_MODE=direnv. devcontainer/both/bare keep the image path unchanged.--mode direnvor the persistedDEVKIT_MODE; it requires an exact--version <tag>(latestis refused) and nix, jq and rsync on PATH.install.sh.Proof
Container-free run with docker/podman absent from PATH, in a scratch repo with
DEVKIT_MODE=direnv:install.sh --version 1.18.0scaffolded the workspace; after committing,--forceleftgit statusclean. Tests:tests/test_install_direnv_host.py(dry-run plans, container modes unchanged, executed scaffold + upgrade with docker/podman stubs that fail on any call,latestrefusal) andtests/test_workflow_devkit_upgrade.py.Refs: #1871
Cost and coverage notes
nix developof the pinned release adds about 3.8 s warm (1.18.0, store populated; measured once). A cold run additionally fetches the dev-shell closure from the binary cache and was not measured.