Nixos Best Practices

🌐Community
by lihaoze123 · vlatest · Repository

Applies NixOS best practices—configuration management, declarative infrastructure, reproducible builds—for optimized system setup.

Install on your platform

We auto-selected Claude Code based on this skill’s supported platforms.

1

Run in terminal (recommended)

terminal
claude mcp add nixos-best-practices npx -- -y @trustedskills/nixos-best-practices
2

Or manually add to ~/.claude/settings.json

~/.claude/settings.json
{
  "mcpServers": {
    "nixos-best-practices": {
      "command": "npx",
      "args": [
        "-y",
        "@trustedskills/nixos-best-practices"
      ]
    }
  }
}

Requires Claude Code (claude CLI). Run claude --version to verify your install.

About This Skill

What it does

This skill helps AI agents configure NixOS systems using flakes, manage overlays effectively, and structure configurations for maintainability. It emphasizes following established best practices within the NixOS ecosystem, ensuring reproducible builds and optimized system setup. The skill guides users to avoid common pitfalls by referencing relevant rule files and documentation before making configuration changes.

When to use it

  • Configuring NixOS with flakes and Home Manager
  • Troubleshooting issues where overlays don't seem to apply correctly
  • Implementing useGlobalPkgs = true with custom overlays
  • Organizing NixOS configurations across multiple hosts
  • Diagnosing situations where package changes aren’t appearing after a rebuild

Key capabilities

  • Flakes configuration management
  • Overlay scope and application understanding (particularly in relation to useGlobalPkgs)
  • Structuring host configurations for organization
  • Package installation best practices within NixOS
  • Guidance on avoiding common configuration mistakes
  • Systematic debugging approaches for NixOS issues

Example prompts

  • "How do I configure overlays when using useGlobalPkgs = true?"
  • "What is the correct structure for a NixOS flake configuration?"
  • "I'm having trouble with an overlay not applying. What should I check?"

Tips & gotchas

  • Read the documentation first: Before making any changes, review the relevant rule files (overlay-scope, flakes-structure, etc.) and common-mistakes.md.
  • Overlay placement is critical: When using useGlobalPkgs = true, overlays must be defined in the NixOS configuration block, not within Home Manager files.
  • Avoid guesswork: Consult documentation rather than experimenting with options or assuming functionality.

Tags

🛡️

TrustedSkills Verification

Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.

Security Audits

Gen Agent Trust HubPass
SocketPass
SnykPass

Details

Version
vlatest
License
Author
lihaoze123
Installs
42

🌐 Community

Passed automated security scans.