スキル一覧に戻る
JohnVicke

nix-patterns

by JohnVicke

1🍴 0📅 2026年1月13日
GitHubで見るManusで実行

SKILL.md


name: nix-patterns description: Nix and Home Manager idioms for dotfiles configuration

Formatting

  • Use alejandra formatter (just fmt or nix 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 ... in for complex expressions
  • Prefer functional patterns
  • Use with pkgs; sparingly, only when improves readability

Commands

CommandPurpose
just buildValidate config without switching
just rebuildApply configuration
just fmtFormat all Nix files
just checkValidate flake
just updateUpdate 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 { ... };
  })
];

スコア

総合スコア

40/100

リポジトリの品質指標に基づく評価

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

レビュー

💬

レビュー機能は近日公開予定です