搜索

PythonReactSEOPDF
GitHub Skill

new-host

Add a new NixOS or Darwin host to serenitea-pot. Use when user asks to add a machine, create a host, or bootstrap a new system.

codgician☆ 12 仓库 Stars2 仓库 Forks

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

查看来源 ↗使用指南

技能说明

Add New Host

Step 1: Gather Requirements

Ask the user:

Question Options
Platform nixos or darwin
Hostname Genshin character (lowercase, e.g., nahida, furina)
Architecture NixOS: x86_64-linux, aarch64-linux / Darwin: aarch64-darwin, x86_64-darwin
Type (NixOS only) bare-metal, vm, container, wsl

Step 2: Run Bootstrap Script

./new-host.sh <platform> <hostname> <arch> [type]

Examples:

./new-host.sh nixos wanderer x86_64-linux wsl
./new-host.sh darwin keqing aarch64-darwin

Step 3: Customize Configuration

Edit hosts/<platform>/<hostname>/system.nix:

NixOS Specifics
  • Bare metal/VM: Generate hardware config with nixos-generate-config --show-hardware-config
  • Secrets access: Add SSH pubkey to secrets/pubkeys.nix, then agenix -r
  • Impermanence: Set codgician.system.impermanence.enable = true
Darwin Specifics
  • Homebrew casks: Add to codgician.system.brew.casks
  • App Store apps: Find IDs with mas search "App Name", add to masApps

Step 4: Validate & Build

nix fmt
nix flake check
nix build .#nixosConfigurations.<hostname>.config.system.build.toplevel  # NixOS
nix build .#darwinConfigurations.<hostname>.system                        # Darwin

Step 5: Deploy (User Approval Required)

NixOS
nixos-rebuild switch --flake .#<hostname> --target-host <hostname> --use-remote-sudo
Darwin (first time)
./result/sw/bin/darwin-rebuild switch --flake .

Exit Criteria

  • Host directory exists at hosts/<platform>/<hostname>/
  • nix flake check passes
  • Build succeeds

使用示例

查看来源仓库中的使用示例与配置说明。

查看来源 ↗

来源历史

收录时间
2026-03-11
索引更新时间
2026-03-11
Branch
main

收录与同步日期属于本站记录。源码修改历史请查看来源仓库。

GitHub ↗

chat Comments (0)

chat_bubble_outline

No comments yet. Be the first to share your thoughts!