← Back to list

nix-patterns
by JohnVicke
⭐ 1🍴 0📅 Jan 13, 2026
SKILL.md
name: nix-patterns description: Nix and Home Manager idioms for dotfiles configuration
Formatting
- Use
alejandraformatter (just fmtornix fmt .) - camelCase for variables and function arguments
- snake_case for config keys following external conventions
Structure
{
config,
lib,
pkgs,
...
}: let
myVar = "value";
scripts = map (name: pkgs.writeShellScriptBin name ...) scriptFiles;
in {
home.packages = [ pkgs.foo ] ++ scripts;
}
- Group related configurations together
- Use
let ... infor complex expressions - Prefer functional patterns
- Use
with pkgs;sparingly, only when improves readability
Commands
| Command | Purpose |
|---|---|
just build | Validate config without switching |
just rebuild | Apply configuration |
just fmt | Format all Nix files |
just check | Validate flake |
just update | Update flake inputs |
Common Patterns
Script from file
pkgs.writeShellScriptBin "my-script" (builtins.readFile ./scripts/my-script.sh)
Optional config
lib.mkIf config.programs.foo.enable {
home.packages = [ pkgs.bar ];
}
Overlay
nixpkgs.overlays = [
(final: prev: {
myPkg = prev.myPkg.override { ... };
})
];
Score
Total Score
40/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
Reviews
💬
Reviews coming soon