- New feature module: drop
modules/{nixos,darwin,home}-modules/<name>.nixwrapped in{ ... }: { flake.<class>Modules.<name> = <NixOS module>; }.import-treepicks it up; nothing else to wire. - New host: add the host file(s) under
hosts/{nixos,darwin,home/<user>}/and add a smallmkNixos/mkDarwin/mkHomeentry tomodules/wiring/hosts.nix(system +hostPath, plussharedPathfor HM). System architecture is declared per host (no morehostToSystemheuristic — be explicit). - New overlay: drop
modules/overlays/<name>.nixexportingflake.overlays.<name> = final: prev: { ... }. - New package: place the callPackage derivation at
packages/<name>.nixand register it viamodules/packages/<name>.nix:{ ... }: { perSystem = { pkgs, ... }: { packages.<name> = pkgs.callPackage ../../packages/<name>.nix { }; }; } - NixOS users:
modules/nixos-modules/users-<user>.nixis one self-contained module per user. Enable on a host viamodules.users.<user>.enable = true;.
Add Nix Component
How to add a new feature module, host, overlay, package, or NixOS user to this flake. Use when creating any new file under modules/, hosts/, or packages/.
Add Nix Component by billimek · 9f39e18
npx skillmds@latest add billimek/add-nix-component File contents
---name: add-nix-componentdescription: How to add a new feature module, host, overlay, package, or NixOS user to this flake. Use when creating any new file under modules/, hosts/, or packages/.---1. **New feature module**: drop `modules/{nixos,darwin,home}-modules/<name>.nix` wrapped in `{ ... }: { flake.<class>Modules.<name> = <NixOS module>; }`. `import-tree` picks it up; nothing else to wire.2. **New host**: add the host file(s) under `hosts/{nixos,darwin,home/<user>}/` and add a small `mkNixos`/`mkDarwin`/`mkHome` entry to `modules/wiring/hosts.nix` (system + `hostPath`, plus `sharedPath` for HM). System architecture is declared per host (no more `hostToSystem` heuristic — be explicit).3. **New overlay**: drop `modules/overlays/<name>.nix` exporting `flake.overlays.<name> = final: prev: { ... }`.4. **New package**: place the callPackage derivation at `packages/<name>.nix` and register it via `modules/packages/<name>.nix`: ```nix { ... }: { perSystem = { pkgs, ... }: { packages.<name> = pkgs.callPackage ../../packages/<name>.nix { }; }; } ```5. **NixOS users**: `modules/nixos-modules/users-<user>.nix` is one self-contained module per user. Enable on a host via `modules.users.<user>.enable = true;`.
billimek/dotfiles/tree/main/.claude/skills/add-nix-component commit 9f39e18d2e
Frequently asked questions
Run npx skillmds@latest add billimek/add-nix-component in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
How to add a new feature module, host, overlay, package, or NixOS user to this flake. Use when creating any new file under modules/, hosts/, or packages/. It is listed under Web & Frontend on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
billimek (@billimek) published this skill. Their other Agent Skills are listed on their SkillMD profile.