lihaoze123 avatar

Nixos Best Practices

Guidance for NixOS flakes that enforces overlay placement under home-manager useGlobalPkgs and structures host configs.

CCM score
49 of 100
skills.sh installs
296
GitHub stars
3
last updated
Jun 3, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers overlay scope decisions, flake structure, host organization, package installation, and common configuration mistakes for NixOS with Home Manager
  • Includes a decision matrix mapping useGlobalPkgs settings to the file where an overlay must be defined to take effect
  • Enforces defining overlays in the NixOS home-manager block when useGlobalPkgs = true, since home.nix overlays are silently ignored
  • Designed for troubleshooting packages that do not appear after rebuild, and for configurations spanning multiple hosts

Install

$ npx -y skills add lihaoze123/my-claude-code --skill nixos-best-practices -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

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

Details

Repository
github.com/lihaoze123/my-claude-code
Categories
DevOps & Cloud, CLI & Terminal
First seen
Jun 3, 2026

Similar to Nixos Best Practices

More DevOps & Cloud