feat: adopt treefmt formatting and checks #116
No reviewers
Labels
No labels
host:electra
host:fleet
host:lyra
host:vega
host:vega
phase:cutover
phase:deploy
phase:mcp
phase:module
phase:packaging
phase:prep
phase:validation
project:attic-postgres-lyra-rollout
project:auto-update-reliability
project:declarative-purity-cleanup
project:external-review
project:host-facts-refactor
project:lyra-nixos-deploy
project:lyra-service-stack-migration
project:nebula-mesh-network
project:security-hardening
project:service-stack-migration
project:vega-sillytavern-cutover
service:auto-update
service:mem0
service:sillytavern
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
nimmo/nixos-config!116
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/treefmt-nix"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #112
Summary
nix fmtformatternix flake checkderivationValidation
nix fmt -- --cinix flake checkshellcheck -S warning scripts/*.sh tests/*.shactionlintwith the repository's documented ignores./tests/auto-update-regressions.shAutomated code review
Reviewed commit:
2671a70e25cf78d7cf667e7ae2b457b84d9970aaVerdict: Ready to merge
No blocking or important findings were retained, and deterministic checks passed. Suggestions remain advisory.
Overall assessment
Adopts treefmt-nix to replace a custom shell-based formatter, updates flake inputs and auto-update policy accordingly, documents formatting commands in README, and adjusts regression tests to reflect the new policy group count. Formatting changes across scripts and modules are consistent with shfmt/nixfmt conventions.
Blocking findings
None.
Important findings
None.
Suggestions
Document 2-space shell indentation standard (treefmt.nix:9; high confidence)
options = [ "-i" "2" ];
Impact: Enforces 2-space indentation for shell scripts, which may differ from common conventions and could cause friction during manual edits or reviews.
Suggested fix: Add a brief note in README.md under the formatting section to guide contributors.
Consider dynamic system evaluation for formatter (flake.nix:93; medium confidence)
treefmtEval = treefmt-nix.lib.evalModule nixpkgs.legacyPackages.x86_64-linux ./treefmt.nix;
Impact: Hardcodes the package set to x86_64-linux. If the flake is evaluated on a different architecture, formatter evaluation may fail unless explicitly handled elsewhere.
Suggested fix: Consider passing the system's packages dynamically or document that formatters are intentionally restricted to the host platform.
Tests and validation
Questions
Review limitations
Diff coverage
README.md: reviewed — included in a context-limited batchflake.lock: reviewed — included in a context-limited batchflake.nix: reviewed — included in a context-limited batchlib/auto-update-policy.nix: reviewed — included in a context-limited batchmodules/common/pangolin-mcp-launcher.nix: reviewed — included in a context-limited batchmodules/networking/nebula.nix: reviewed — included in a context-limited batchmodules/profiles/ollama.nix: reviewed — included in a context-limited batchmodules/services/whisper.nix: reviewed — included in a context-limited batchscripts/attic-cache-build.sh: reviewed — included in a context-limited batchscripts/auto-update-recover-stopped.sh: reviewed — included in a context-limited batchscripts/auto-update-workflow-route.sh: reviewed — included in a context-limited batchscripts/nixos-auto-update-control.sh: reviewed — included in a context-limited batchscripts/nixos-auto-update.sh: reviewed — included in a context-limited batchscripts/nixos-update-common.sh: reviewed — included in a context-limited batchscripts/personalise.sh: reviewed — included in a context-limited batchtests/auto-update-regressions.sh: reviewed — included in a context-limited batchtreefmt.nix: reviewed — included in a context-limited batchReview metadata