Search

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 Repository stars2 Repository forks

Installation

Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.

View source ↗Guides

Skill instructions

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

Examples

Read the usage examples in the source repository.

View source ↗

Source history

Indexed on
2026-03-11
Index updated
2026-03-11
Branch
main

Index and sync dates describe this directory. View the source repository for code history.

GitHub ↗

chat Comments (0)

chat_bubble_outline

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