Repository navigation
fix(setup): ensure a containers policy.json so podman load works in the dev-shell - #686
Merged
c-vigo merged 3 commits intoJun 24, 2026
Conversation
This was referenced Jun 25, 2026
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
On a NixOS host that gets
podmanfrom the flake dev-shell (the intended #625 onboarding path) rather than thevirtualisation.containersNixOS module,just buildfailed atpodman load -i resultbecause no signature-verificationpolicy.jsonexisted at~/.config/containers/policy.jsonor/etc/containers/policy.json.nix buildsucceeded, but the image could not be loaded.The onboarding gap:
scripts/init.sh's advisory host check usespodman info, which does not requirepolicy.json, sojust initreported the runtime green and the failure only surfaced later atjust build.Root cause
podman's containers/image library requires a
policy.jsonforpodman load; this build exposes no--signature-policyflag and no env-var override, so the file must physically exist at one of the two lookup paths. The NixOS module normally installs/etc/containers/policy.json; a dev-shell-only host never receives it.Fix
scripts/init.sh(Host Checks) now ensures the user-level~/.config/containers/policy.jsonwith the standard permissive default ({ "default": [ { "type": "insecureAcceptAnything" } ] }, the same contentcontainers-common/ the NixOS module ship) when neither lookup path has a policy. The write is:--check—--checkexits before Host Checks, so it stays read-only.Documented in
docs/NIX.md(new Host container runtime (policy.json) subsection) and recorded inCHANGELOG.md(auto-synced to the workspace changelog).Testing
tests/bats/init.bats: 3 new structural assertions (policy.json wired, permissive default, system-path short-circuit) — added RED, now green; full suite passes (29/29).HOME): first run writes valid JSON; second run is idempotent; an existing system policy short-circuits without creating a user file.shellcheck scripts/init.shpasses;bash -nparses clean.Closes #685