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 文件放在可预测的目录中。
审查包模式
检查包添加是否使用清晰的列表和特定于平台的条件。
试试这些提示
Use the nix-patterns skill to add these Home Manager packages: [packages]. Keep the module structure simple.
Use the nix-patterns skill to draft a Home Manager module for [program]. Include packages and one configuration file.
Use the nix-patterns skill to add [package] only on x86_64-linux while keeping shared packages available everywhere.
Use the nix-patterns skill to reorganize this Nix configuration into home modules, NixOS modules, host files, and imports.
最佳实践
- 保持 Home Manager 模块专注于用户包和用户配置文件。
- 当某个包只对一种系统类型有效时,使用平台条件。
- 从清晰的入口点导入模块,使配置流程易于审查。
避免
- 将特定于 host 的设置混入可复用的 Home Manager 模块。
- 在没有条件判断的情况下,将特定于平台的包添加到共享包列表中。
- 创建模块后未将其添加到适当的导入列表中。