nix-patterns
使用 Home Manager 模式建置 NixOS 模組
NixOS 和 Home Manager 模組設定可能重複且容易出錯。此技能提供套件、模組和匯入的精簡模式。
使用我的智慧代理安裝
將此請求複製給你的智慧代理,其中包含權威 Skill 頁面和清單。
Review the Skillstore skill "nix-patterns" from https://skillstore.io/skills/edgarpost-nix-patterns.md and its manifest at https://skillstore.io/api/skills/edgarpost-nix-patterns/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.你的智慧代理仍應顯示其計畫,並依安全政策請求必要確認。
Agent 可讀資源
當 AI Agent、爬蟲或腳本需要乾淨脈絡、而不是讀取完整頁面時,請使用這些連結。
測試它
正在使用「nix-patterns」。 我需要一個桌面應用程式的 Home Manager 模組,並包含一個設定檔。
預期結果:
一份精簡的模組計畫,包含套件清單、使用者設定檔位置和匯入位置。
正在使用「nix-patterns」。 我想要一個只在 x86_64-linux 系統上的套件。
預期結果:
一項套件清單建議,將共用套件與平台特定套件分開。
正在使用「nix-patterns」。 我的儲存庫混合了 NixOS 和 Home Manager 檔案。
預期結果:
一項目錄版面配置建議,將使用者模組、系統模組、host 設定和主要 home 入口點分開。
安全審計
安全All command-execution findings are Markdown backticks used for inline paths or fenced Nix examples, not executable code. The traversal finding is a normal relative Nix import example and does not process user input. No prompt injection or malicious intent was found in SKILL.md.
風險因素
⚙️ 外部命令 (10)
📁 檔案系統存取 (1)
分享與引用此報告
分享版本化評估報告、中性徽章、嵌入卡片與引用。Skillstore 只報告證據,不判斷該 Skill 是否安全。
複製報告連結
https://skillstore.io/skills/edgarpost-nix-patterns/audits/8?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportMarkdown 徽章
[](https://skillstore.io/skills/edgarpost-nix-patterns?utm_source=security_passport_badge)HTML 徽章
<a href="https://skillstore.io/skills/edgarpost-nix-patterns?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/edgarpost-nix-patterns/security.svg" alt="Skillstore security assessment" loading="lazy"></a>嵌入卡片
<iframe src="https://skillstore.io/embed/skills/edgarpost-nix-patterns.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>學術引用 (APA · BibTeX · CFF)
APA 引用
EdgarPost. (2026). nix-patterns security audit report (audit version 8) [Author version unspecified]. Skillstore. https://skillstore.io/skills/edgarpost-nix-patterns/audits/8BibTeX 引用
@techreport{edgarpost-edgarpost-nix-patterns-2026,
author = {EdgarPost},
title = {nix-patterns security audit report (audit version 8)},
institution = {Skillstore},
year = {2026},
number = {8},
url = {https://skillstore.io/skills/edgarpost-nix-patterns/audits/8},
note = {Author version unspecified}
}CITATION.cff
cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "nix-patterns security audit report (audit version 8)"
version: "unspecified"
type: report
authors:
- name: "EdgarPost"
date-released: "2026-07-06"
url: "https://skillstore.io/skills/edgarpost-nix-patterns/audits/8"
identifiers:
- type: other
value: "skillstore:edgarpost-nix-patterns:audit:8"
description: "Skillstore immutable audit report identifier"
Skillstore 評分
評分依據 證據置信度: 高你可以打造什麼
建立 Home Manager 模組
草擬一個小型模組,用於新增套件並寫入使用者設定檔。
組織系統設定
將 NixOS 模組、Home Manager 模組和 host 檔案放在可預期的目錄中。
檢視套件模式
檢查套件新增是否使用清楚的清單和平台特定條件判斷。
試試這些提示
使用 nix-patterns 技能新增這些 Home Manager 套件:[packages]。保持模組結構簡單。
使用 nix-patterns 技能為 [program] 草擬 Home Manager 模組。包含套件和一個設定檔。
使用 nix-patterns 技能只在 x86_64-linux 上新增 [package],同時讓共用套件在各處都可用。
使用 nix-patterns 技能將此 Nix 設定重新組織為 home 模組、NixOS 模組、host 檔案和匯入項目。
最佳實務
- 讓 Home Manager 模組專注於使用者套件和使用者設定檔。
- 當套件只適用於一種系統類型時,使用平台條件判斷。
- 從清楚的入口點匯入模組,讓設定流程保持易於檢視。
避免
- 將 host 特定設定混入可重用的 Home Manager 模組。
- 在沒有條件判斷的情況下,將平台特定套件新增到共用套件清單。
- 建立模組卻未將其加入適當的匯入清單。