lihaoze123 avatar

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-code

Installs 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:

  1. Review relevant rule files from the Quick Reference below
  2. Check common-mistakes.md to avoid known pitfalls
  3. Check troubleshooting.md for systematic debugging approach
  4. 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

Recommended

1juliusbrussee avatarcavemanjuliusbrussee/cavemanUltra-compressed communication mode. Cuts output tokens 65% (measured) by speaking like caveman while keeping full technical accuracy. Supports intensity levels618.3Kskills.sh installs
2mattpocock avatargrill-memattpocock/skillsA relentless interview to sharpen a plan or design.1.5Mskills.sh installs
3shadcn avatarimproveshadcn/improveSurvey any codebase as a senior advisor and produce prioritized, self-contained implementation plans for OTHER models/agents to execute. Strictly read-only on s40Kskills.sh installs
4obra avatarsystematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes326.7Kskills.sh installs
5forrestchang avatarkarpathy-guidelinesforrestchang/andrej-karpathy-skillsBehavioral guidelines to reduce common LLM coding mistakes through explicit assumptions, simplicity, and verifiable success criteria.17.9Kskills.sh installs
6vercel-labs avatarfind-skillsvercel-labs/skillsHelps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express int4.3Mskills.sh installs