nix-patterns

Automate reproducible dotfiles management for macOS and Linux with nix-darwin and home-manager.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/aitchwhy/dotfiles --skill nix-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nix-patterns
Source: https://github.com/aitchwhy/dotfiles/tree/main/config/agents/skills/nix-patterns
Command: npx skills add https://github.com/aitchwhy/dotfiles --skill nix-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Establishes scope-restricted patterns for Nix-based dotfiles management (nix-darwin, home-manager, flake structure).

Core Features & Use Cases

  • Clear architecture (flake, modules, lib)
  • Guidelines for macOS/home-manager
  • Not for development; explicit boundaries

Quick Start

Implement patterns to enforce nix-darwin/home-manager structure.

Frequently Asked Questions about nix-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage dotfiles across macOS and Linux with version control?

Dotfiles management with Nix uses flake-based structures combined with nix-darwin and home-manager to version-control system and user configurations reproducibly. This approach stores all settings in a centralized repository, enabling identical environments across machines and platforms through declarative configuration files.

Can I use Nix flakes to standardize my home-manager and nix-darwin setup?

Yes. Nix flakes provide a reproducible framework for home-manager and nix-darwin configurations by pinning dependencies in flake.lock and organizing modules and libraries in a multi-file architecture. This ensures consistent, portable dotfiles deployments across Darwin and Linux systems.

What's the best way to structure a Nix-based dotfiles repository?

Effective Nix dotfiles use a multi-file flake-based architecture with separate modules for Darwin configurations and Home Manager settings, centralized library functions, development shells, and pre-commit hooks. This design enforces clear separation of concerns and enables validation checks before deployment.

Does a Nix dotfiles pattern support macOS system preferences?

Yes. nix-darwin within a flake structure manages macOS system preferences declaratively alongside home-manager user environments. Combined with version control and pre-commit validation, this ensures system customization is reproducible and auditable.

What boundaries should I set for Nix dotfiles patterns?

Nix dotfiles patterns focus on configuration management and deployment, not development environments. They exclude development tooling setup; use separate development shells and Nix flakes for that workflow to maintain clear architectural scope.