1.3 KiB
1.3 KiB
Agent Guidelines for m3ta-nixpkgs
Build/Lint/Test Commands
nix flake check- Validate flake and run checksnix fmt- Format all Nix files (uses nixpkgs-fmt)nix build .#<package>- Build a specific packagenix flake show- List all available outputsstatix check .- Lint Nix files (run innix developshell)deadnix .- Find dead/unused Nix code (run innix developshell)
Code Style
- Formatter: Always run
nix fmtbefore committing - Naming: Package names use lowercase-hyphen (
my-package), variables use camelCase - Imports: Multi-line with trailing commas:
{ lib, stdenv, fetchFromGitHub, }: - Modules: Use
with lib; let cfg = config.namespace.module; in { ... }pattern - Options: Use
mkEnableOptionfor enable flags, namespace underm3ta.* - Meta: Always include description, homepage, license, platforms, mainProgram
- Comments: Explain "why" not "what"; document non-obvious logic
File Organization
- One package per directory under
pkgs/, entry point isdefault.nix - Register packages in
pkgs/default.nixusingcallPackage - Modules go in
modules/nixos/ormodules/home-manager/by category
Commit Format
type: brief description where type is: feat, fix, docs, style, refactor, chore