configuring-layers

Organize multi-level configuration layering across seven hierarchy levels.

340|18|Updated May 11, 2023
One-click install
npx skills add https://github.com/khaneliman/khanelinix --skill configuring-layers
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: configuring-layers
Source: https://github.com/khaneliman/khanelinix/tree/main/modules/common/ai-tools/skills/configuring-layers
Command: npx skills add https://github.com/khaneliman/khanelinix --skill configuring-layers

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

khanelinix uses a seven-level configuration hierarchy to organize customizations, helping you decide where to place changes and how to resolve option conflicts across host, platform, and user scopes.

Core Features & Use Cases

  • 7-Level Hierarchy: Common, Platform, Home, Suite, Archetype, Host, User.
  • Quick Decision Tree: step-by-step guidance to choose the right layer for a change.
  • Override Precedence: patterns for layering defaults, host/user overrides, and strong overrides.
  • Use Case: structure complex configurations across multi-machine environments to avoid drift and conflicts.

Quick Start

Identify where to place the change by following the seven-level hierarchy from common modules to user configs.

Frequently Asked Questions about configuring-layers

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

FAQPage Schema
How do I organize NixOS configuration layers to avoid option conflicts across multiple machines?

NixOS configuration layering resolves option conflicts by applying a seven-level hierarchy—Common, Platform, Home, Suite, Archetype, Host, and User—with defined precedence rules so defaults, host overrides, and user customizations never clash across multi-machine environments.

What is the best way to decide which NixOS configuration layer to place a new module override in?

The best way to decide is following a step-by-step decision tree that evaluates the change scope from common modules down to host configs and user customizations, placing options in the most specific layer necessary to avoid unintended overrides.

How does configuration layering precedence work when overriding defaults in NixOS?

Configuration layering precedence works by applying defaults at the Common level, escalating through Platform and Host layers, and resolving with strong User overrides, ensuring higher-level customizations cleanly supersede lower-level defaults without conflicts.

Can I use a layered configuration strategy for both host and home-manager user customizations?

Yes, layered configuration strategies apply to both host and home-manager user customizations by mapping changes across the seven levels, allowing platform-wide defaults to coexist with specific host configs and individual user home settings.

When should I not use a multi-level configuration hierarchy for NixOS modules?

You should avoid a multi-level configuration hierarchy for simple, single-machine NixOS setups where the overhead of managing seven layers outweighs the benefit of structured conflict resolution, as a flat configuration suffices without drift risks.