← スキル一覧に戻る

nix-helper
by TwIStOy-contrib
⭐ 4🍴 0📅 2026年1月21日
SKILL.md
name: nix-helper description: | Use when the user ask to "add a package", "configure a new program", "troubleshoot Nix build errors", "update flake inputs", "add a new host", "manage secrets with agenix", "create out-of-store symlink" or mentions Nix, Home Manager or nix-darwin configuration in this repository.
Nix Helper
Provide guidance for managing Nix configuration in this repository.
Directory Structure
dotnix/
├── flake.nix # Main flake definition (inputs/outputs)
├── flake.lock # Locked dependency versions
├── justfile # Build automation recipes
├── constants.nix # User constants and environment variables
├── constants-work.nix # Work-specific constants
│
├── hosts/ # Host-specific configurations
├── modules/ # Modular configuration system
├── lib/ # Helper functions and utilities
├── outputs/ # Flake output orchestration
├── vars/ # Variable definitions
├── secrets/ # Agenix encrypted secrets
├── scripts/ # Helper scripts
├── shells/ # Development shells
└── templates/ # Project templates
Common Tasks
Adding a new package
- Determine which platform this package supports.
- If the package is darwin only, configure it under
models/darwin/. - If the package is linux only, configure it under
models/nixos/. - If the package is available on both platforms, configure it under
models/shared/.
- If the package is darwin only, configure it under
- If the package requires configuration, create a new module in the appropriate directory. Otherwise, find an existing category module and add the package there.
- If a new module is created, enable it in the relevant parent module if exists. E.g., after adding a new
dotnix.apps.opencodemodule, enable it indotnix.suits.development.
See refrerences/package-management.md for module structure patterns.
Configuring a program
- Identify if the program is existing in the configuration.
- If it exists, is the program has a standalone module or it is configured within another module?
- If standalone, modify the existing module.
- If within another module, consider creating a new standalone module for better organization.
- If it does not exist, create a new module in the appropriate directory based on platform.
- If it exists, is the program has a standalone module or it is configured within another module?
- Follow the module structure patterns in
refrerences/package-management.mdto create or modify the module.
See refrerences/package-management.md for module structure patterns.
Adding a new secret
Edit the secret describe file: secrets/secrets.nix, adds the new secret file to the list, then create the secret file in secrets/ with .age extension.
# new secret age file
"secret-file.age".publicKeys = mkSecrets (hostServers ++ desktops);
Create a new empty secret file: (Run the bash command under the dotnix/secrets/ directory)
echo "" | agenix -e <path-to-secret-file> -i /etc/ssh/ssh_host_ed25519_key
Adds the secret file to the modules/shared/secrets.nix, append the secret to the age.secrets list.
age.secrets = {
...
"secret-file" = ageSecret {
file = "secret-file.age";
owner = user.name;
}
};
スコア
総合スコア
60/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です