Contributing
Requirements
Section titled “Requirements”Before submitting changes, ensure:
- All Nix files are formatted — Run
nix fmtbefore committing - All tests pass — Run
nix flake check - Commit messages follow Conventional Commits — e.g.,
feat:,fix:,chore:
Development commands
Section titled “Development commands”| Command | Description |
|---|---|
nix flake check |
Validate configuration and run all tests |
nix fmt |
Format all code (nixfmt, deadnix, statix, shellcheck, yamlfmt, typos, actionlint) |
devenv shell |
Enter development shell with necessary tools (no experimental features needed) |
nix flake show |
Display all flake outputs |
nix run |
Run a QEMU VM with all features enabled (x86_64-linux) |
Code formatting
Section titled “Code formatting”nix fmt runs multiple tools:
- nixfmt — Nix code formatting
- deadnix — Unused variable detection
- statix — Nix linting
- shellcheck — Shell script linting
- yamlfmt — YAML formatting
- typos — Spell checking
- actionlint — GitHub Actions workflow linting
All must pass. CI enforces formatting with nix fmt -- --ci.
Adding features
Section titled “Adding features”- Create the module file in the appropriate
modules/subdirectory —modules/nixos/andmodules/home/are auto-discovered, so no import edit is needed; onlymodules/darwin/default.nixis a hand-curated import list - Define new options in a file under
modules/nixos/options/(auto-discovered) undermarchyo.* - Add an evaluation test in
tests/eval/<feature>.nix - Run
nix fmtandnix flake check
See Adding Modules for detailed instructions.
Commit message format
Section titled “Commit message format”Follow the Conventional Commits specification:
feat: add support for custom wallpapersfix: resolve audio crackling on PipeWirechore: update flake inputsdocs: add keyboard configuration guiderefactor: simplify GPU vendor detection