一键导入
nix-module
Conventions for writing NixOS and Home Manager modules in the NyxOS Dendritic flake-parts repository. Load before touching any .nix file.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Conventions for writing NixOS and Home Manager modules in the NyxOS Dendritic flake-parts repository. Load before touching any .nix file.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Create and maintain Nix packages in the NyxOS flake, including derivations, module wiring, lockfiles, and upstream patterns. Covers general packages and .NET-specific tooling.
Build and sharpen a project's domain model. Use when the user wants to pin down domain terminology or a ubiquitous language, record an architectural decision, or when another skill needs to maintain the domain model.
Interview the user relentlessly about a plan or design. Use when the user wants to stress-test a plan before building, or uses any 'grill' trigger phrases.
A relentless interview to sharpen a plan or design, which also creates docs (ADR's and glossary) as we go.
.NET 10 and C# conventions — SDK paths, build commands, NuGet
Compact the current conversation into a handback document to give back to the session that created the handoff.
| name | nix-module |
| description | Conventions for writing NixOS and Home Manager modules in the NyxOS Dendritic flake-parts repository. Load before touching any .nix file. |
| compatibility | opencode |
modules/<camelCase>.nixmodules/hosts/<camelCase>.nixflake.nix is auto-generated — never edit. Add inputs only in flake-file.inputs blocks.{ inputs, ... }: (use { ... }: when no inputs needed)flake-file.inputs = {
some-input.url = "github:owner/repo";
some-input.inputs.nixpkgs.follows = "nixpkgs"; # always required
};
After adding/changing inputs, run regenerate (nix run ~/NyxOS#write-flake).
flake.modules.nixos.<kebab-case>flake.modules.homeManager.<kebab-case># System Module <name>: <description>
# Home Module <name>: <description>
Declared in modules/hosts/<camelCase>.nix as flake.nixosConfigurations.<PascalCase>.
| Host | Arch | Notes |
|---|---|---|
| EliasPC | x86_64-linux | Intel + AMD GPU, desktop, distributed-builder |
| EliasLaptop | x86_64-linux | Intel + NVIDIA GPU, isMobile = true |
| FredPC | x86_64-linux | KDE, German locale |
| NixPi | aarch64-linux | Raspberry Pi, no desktop |
pkgs → nixos-unstable (default)pkgs-stable → nixos-25.11 (via specialArgs; use only for packages that break on unstable, e.g. libreoffice, kdenlive)# let bindings before attrset body
let myPkg = pkgs.foo.override { bar = true; }; in
{
environment.systemPackages = with pkgs; [ pkg1 pkg2 ];
boot.binfmt.emulatedSystems = lib.mkIf (system == "x86_64-linux") [ "aarch64-linux" ];
some.option = lib.mkDefault "value";
other.option = lib.mkForce "override";
}
specialArgs / extraSpecialArgs, not optionsconfig.home.homeDirectory, never /home/elias or ~lib.mkIf (system == "x86_64-linux") { ... }imports = with inputs.self.modules.nixos; [ foo bar ];| Item | Convention |
|---|---|
| Module files | camelCase.nix |
| NixOS / HM module names | kebab-case |
nixosConfigurations keys | PascalCase |
let variables | camelCase |
nixpkgs-fmt <file>.nix # format single file
nixpkgs-fmt . # format all
Do not build or run flake check! Building is reserved for the developer, except when explicitly requested.
Use only the LSP for checking.
mcp-nixos — NixOS/HM option lookup, package search, nixpkgs attributes. Prefer this for anything Nix-ecosystem.context7 — upstream library docs, non-NixOS API references.