
Nixos Best Practices
If you're using NixOS with flakes and home-manager, this addresses the specific headache of overlays not applying when useGlobalPkgs is true. The core insight is simple but easy to miss: overlays defined in home.nix get ignored in that setup, they need to go in your system configuration instead. It includes decision matrices for where to put overlays based on your useGlobalPkgs setting, plus rule files covering flakes structure, host organization, and common mistakes. The documentation-first approach is a bit heavy-handed with the warnings, but honestly justified since most NixOS configuration issues come from not understanding the interaction between system and home-manager package scopes.
- skills.sh installs
- 128
- GitHub stars
- 2
- last updated
- Jun 3, 2026
Install
$ npx -y skills add lihaoze123/my-skills --skill nixos-best-practices --agent claude-codeInstalls into .claude/skills of the current project.
Files
Configuring NixOS Systems with Flakes
Configure NixOS systems with flakes, manage overlays properly, and structure configurations for maintainability.
⚠️ CRITICAL: Read Before Making Changes
BEFORE making ANY NixOS configuration changes, you MUST:
- Review relevant rule files from the Quick Reference below
- Check common-mistakes.md to avoid known pitfalls
- Check troubleshooting.md for systematic debugging approach
- Follow existing patterns in the codebase
Do NOT start coding until you've read the applicable documentation.
Most configuration errors happen from not reading the rules first. The 5 minutes you spend reading will save hours of debugging.
Red Flags - STOP BEFORE CODING
- "I can just try this option" → Check if it exists in nixpkgs/Home Manager first
- "Let me experiment with different approaches" → Read the docs, don't guess
- "This should work" → Verify syntax and availability in nixpkgs
- Making multiple rebuild attempts → You're missing systematic debugging
- "I remember this works" → Docs change, verify current approach
Core Principle
Sponsors
Details
- Repository
- github.com/lihaoze123/my-skills
- First seen
- Jun 3, 2026