Skip to content

feat(flake): treefmt-nix, deadnix/statix, modules, and nix run .#install (#777) - #790

Merged
c-vigo merged 3 commits into
devfrom
feature/777-flake-polish
Jul 1, 2026
Merged

c-vigo merged 3 commits into
devfrom
feature/777-flake-polish

Conversation

@c-vigo

@c-vigo c-vigo commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Lands the A7 flake-polish bucket (roadmap thread A, PR #670 review), full scope per the plan:

  • treefmt-nix — nix fmt and the flake format gate now run treefmt across nix (nixfmt-rfc-style), python (ruff-format), and toml (taplo) in one pass, wrapping the same formatters the pre-commit hooks already run. checks.format → checks.formatting (treefmt --fail-on-change).
  • deadnix + statix — new checks.deadnix / checks.statix (scoped to the authored flake.nix; the downstream scaffold + example keep their idiomatic { self, … } signatures), and both join devTools. Fixed the two findings this surfaced: unused overlay args (_final/_prev) and inherit (pkgs) vulnix.
  • Modules — nixosModules.default / homeManagerModules.default install the shared devTools toolchain via programs.vigos-devtools.enable = true.
  • Install app — apps.install, so nix run github:vig-os/devcontainer#install bootstraps a consumer project straight from the flake (install.sh stays the behavior SSoT).

Verification

  • nix flake check --accept-flake-config → all checks passed (formatting, deadnix, statix, devShell, devShellTools).
  • nix run .#install -- --help exits 0.
  • tests/test_flake_checks.py extended (TDD RED→GREEN): formatter is treefmt, checks expose the new gates, install app is runnable, both modules are exposed. 4 passed.
  • Pre-commit clean (nixfmt, pymarkdown, typos, sync-manifest, agent-identity).

Docs: docs/NIX.md (formatting/checks/modules/install app) + CHANGELOG.md (Added + Changed).

Refs: #777

c-vigo and others added 3 commits July 1, 2026 08:19
Extend the flake quality-gate tests for the #777 polish: the formatter
becomes the treefmt wrapper, the checks attrset gains formatting/deadnix/
statix gates, apps.<system>.install is a runnable app, and the flake exposes
nixosModules/homeManagerModules default modules.

Refs: #777
Land the #777 flake-polish bucket:

- treefmt-nix: `nix fmt` and the flake format gate now run treefmt across
  nix (nixfmt-rfc-style), python (ruff-format), and toml (taplo) in one pass,
  wrapping the same formatters the pre-commit hooks use. `checks.format`
  becomes `checks.formatting` (treefmt --fail-on-change).
- deadnix + statix: added as `checks.deadnix`/`checks.statix` (scoped to the
  authored flake.nix) and to devTools. Fixed the two findings this surfaced
  (unused overlay args; `inherit (pkgs) vulnix`).
- nixosModules.default / homeManagerModules.default: install the shared
  devTools toolchain via `programs.vigos-devtools.enable`.
- apps.install: `nix run .#install` wraps install.sh (the behavior SSoT).

docs/NIX.md and CHANGELOG updated.

Refs: #777
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.

1 participant