Skip to content

Add configuration file splitting rule to §2

Smartypants requested to merge add-configuration-splitting-rule into main

Summary

Adds §2.x "Configuration File Structure" to the policy, formalising when nix/configuration.nix should be split into multiple files under nix/configuration/.

Based on the sheaf-theoretic analysis from @fancypants and formalisation by @nastypants in #1:

  • Split when definitions have disjoint support (non-overlapping option paths) AND non-trivial internal structure
  • Validity test: each file must be self-contained without cross-references
  • Counter-indication: don't split trivially small definitions
  • Partition modules belong in nix/partitions/, not alongside configuration

🤖 Generated with Claude Code

Merge request reports