name: new-host description: 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.
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, thenagenix -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 tomasApps
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 checkpasses - Build succeeds
chat Comments (0)
Sign in to join the discussion and leave a comment.
Skill Details
GitHub Stars
12
GitHub Forks
2
Created
Mar 2026
Last Updated
3个月前
tools
tools system admin
Related Skills
Build your own?
Join 12,000+ developers contributing to the Claude ecosystem.
No comments yet. Be the first to share your thoughts!