feat(flakeModules): fetch shared configs + with-hooks template#35
Merged
Conversation
Phase 1a follow-up. Wires the dryvist/.github canonical lint configs
(precommit/configs/{tflint.hcl,ansible-lint.yml,yamllint.yml}) into
the terraform and ansible profile modules so consumer repos can delete
their per-repo copies of those files.
New helpers and outputs:
lib/fetch-shared-configs.nix - pure helper returning nix-store paths
keyed by tool name. Sourced from the dryvist-github flake input, so
flake.lock controls which canonical revision every consumer pulls.
templates/with-hooks/ - new `nix flake init -t #with-hooks` scaffold.
Drops in a flake.nix that uses flake-parts and imports the matching
flakeModules profile in one line.
Profile wiring:
flakeModules.terraform now sets tflint.args = [ "--config" path ]
pointing at sharedConfigs.tflint. Consumer repos can delete
.tflint.hcl.
flakeModules.ansible now sets ansible-lint.settings.configPath and
yamllint.settings.configPath to the canonical paths. Consumer repos
can delete .ansible-lint and .yamllint.yml.
flakeModules.python is unchanged - ruff / ruff-format / mypy take
configuration from pyproject.toml, not on-disk linter configs.
flake.lock bump pulls dryvist-github from 61f5215 (zizmor.yml only) to
2e42c2a, the commit where precommit/configs/ landed in PR #12.
All three smoke-test consumers in tests/profile-modules/<profile>/ pass
`nix flake check` against the new wiring.
Refs: shared pre-commit architecture rollout, Phase 1a follow-up.
Assisted-by: Claude <noreply@anthropic.com>
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
Phase 1a follow-up. Wires the dryvist/.github canonical lint configs (added in dryvist/.github#12) into the terraform and ansible profile modules so consumer repos can delete their per-repo copies of
.tflint.hcl,.ansible-lint,.yamllint.yml.New surfaces
lib/fetch-shared-configs.nix— pure helper returning nix-store paths to each canonical config, keyed by tool name. Sourced from thedryvist-githubflake input, soflake.lockcontrols which revision every consumer pulls.templates/with-hooks/— newnix flake init -t github:JacobPEvans/nix-devenv#with-hooksscaffold. Drops in aflake.nixthat uses flake-parts and imports the matching profile in one line, plus a.envrc.Profile wiring
terraformtflint.enable = true;(no config)tflint.args = [ "--config" sharedConfigs.tflint ]ansibleansible-lint.enable = true;(no config)ansible-lint.settings.configPath = sharedConfigs.ansible-lintansibleyamllint.enable = true;(no config)yamllint.settings.configPath = sharedConfigs.yamllintpythonpyproject.toml, no on-disk linter configs neededflake.lock bump
dryvist-github:61f5215(zizmor.yml only) →2e42c2a(commit whereprecommit/configs/landed via dryvist/.github#12).Test plan
tests/profile-modules/terraform/nix flake checkpasses against the new wiring (verified locally)tests/profile-modules/ansible/nix flake checkpasses against the new wiring (verified locally)tests/profile-modules/python/nix flake checkpasses (no behavior change) (verified locally)nix flake checkpasses.tflint.hclto exercise the new wiring end-to-end (separate PR)Architecture context
Pairs with
dryvist/.githubPR #12 (canonical configs) and PR #34 (profile modules). After this merges, Phase 2 consumer migrations delete per-repo lint configs in the same PR that adopts the profile import.Refs: dryvist/.github#12, #34
Assisted-by: Claude noreply@anthropic.com