1.8 KiB
1.8 KiB
Devil's Advocate Review — Project Conventions
Critical rules (must never be violated)
- Never update
system.stateVersion— it must remain at the original installation version. NixOS upgrades are done by updating thechannelfile, notstateVersion. - Never modify
secrets.yamldirectly — these are SOPS-encrypted. Changes must be made vianix-shell -p sops --run 'sops <file>'. - No plaintext secrets in Nix files — passwords, API keys, tokens, and private keys must use
sops.secrets, never hardcoded strings.
Architecture rules
- Explicit module imports only — no wildcard or directory-level imports. Each module must be imported by its explicit path.
- Host structure — each host in
hosts/<name>/must haveconfiguration.nixandhardware-configuration.nix. Symlinksfleet.nixandutils/point to root level. - Shared modules go in
utils/modules/, not duplicated across hosts. - Custom packages in
utils/pkgs/must include anupdate.shscript for automated version updates.
Code style
- Two-space indentation in all Nix files.
- Lower kebab-case for file and directory naming.
- Conventional Commits format:
fix:,feat:,chore:, with optional scope by host (e.g.,fix(mail):). - No "Generated with Claude Code" or "Co-Authored-By: Claude" footers in commits.
Common review checks
- New network services must have corresponding
networking.firewall.allowedTCPPortsorallowedUDPPortsentries. - New
sops.secrets.<name>references must have a corresponding entry in the host'ssecrets.yaml(or the relevant module'ssecrets.yaml). - Changes to
utils/affect all hosts — verify cross-host compatibility. - Package modifications should be testable with a direct
nix-build, not justtest-configuration.