ワンクリックで
create-pi-host
Create a new Raspberry Pi cluster host configuration
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Create a new Raspberry Pi cluster host configuration
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
| name | create-pi-host |
| description | Create a new Raspberry Pi cluster host configuration |
| compatibility | Requires nix, git |
| metadata | {"author":"ruinous.ai","version":"1.1"} |
| parameters | {"pi_model":{"type":"select","description":"Raspberry Pi model","required":true,"options":[{"label":"Pi 5 (Recommended)","description":"Raspberry Pi 5 - newer, faster"},{"label":"Pi 4","description":"Raspberry Pi 4 - older model"}]},"member_name":{"type":"select","description":"NATO phonetic alphabet name for the cluster member","required":true,"options":[{"label":"alpha","description":"First letter"},{"label":"bravo","description":"Second letter"},{"label":"charlie","description":"Third letter"},{"label":"delta","description":"Fourth letter"},{"label":"echo","description":"Fifth letter"},{"label":"foxtrot","description":"Sixth letter"},{"label":"golf","description":"Seventh letter"},{"label":"hotel","description":"Eighth letter"},{"label":"india","description":"Ninth letter"},{"label":"juliet","description":"Tenth letter"},{"label":"Enter other...","description":"kilo, lima, mike, november, oscar, papa, quebec, romeo, sierra, tango, uniform, victor, whiskey, xray, yankee, zulu"}]}} |
Create a new Raspberry Pi host for the RPC (Raspberry Pi Cluster).
If parameters are missing from $ARGUMENTS, use mcp_question to gather them:
mcp_question({
questions: [
{
question: "Which Raspberry Pi model is this?",
header: "Model",
options: [
{ label: "Pi 5 (Recommended)", description: "Raspberry Pi 5" },
{ label: "Pi 4", description: "Raspberry Pi 4" }
]
},
{
question: "What NATO phonetic name for this cluster member?",
header: "Name",
options: [
{ label: "alpha", description: "First letter" },
{ label: "bravo", description: "Second letter" },
{ label: "charlie", description: "Third letter" },
{ label: "delta", description: "Fourth letter" },
{ label: "echo", description: "Fifth letter" },
{ label: "foxtrot", description: "Sixth letter" },
{ label: "golf", description: "Seventh letter" },
{ label: "hotel", description: "Eighth letter" },
{ label: "Enter other...", description: "india, juliet, kilo, lima, etc." }
]
}
]
})
Expected $ARGUMENTS format: rpc-<model>-<name>
rpc-5-alpha (Pi 5, first member)rpc-4-echo (Pi 4, fifth member)Alternative format: <model> <name> which will be combined to rpc-<model>-<name>
5 india → rpc-5-indiarpc = Raspberry Pi Cluster prefix<model> = Pi model: 4 for Pi 4, 5 for Pi 5<name> = NATO phonetic alphabet (alpha, bravo, charlie, delta, echo, foxtrot, golf, hotel, india, juliet, kilo, lima, mike, november, oscar, papa, quebec, romeo, sierra, tango, uniform, victor, whiskey, xray, yankee, zulu)Parse and validate the hostname from $ARGUMENTS
rpc-[45]-(alpha|bravo|charlie|delta|echo|foxtrot|golf|hotel|india|juliet|kilo|lima|mike|november|oscar|papa|quebec|romeo|sierra|tango|uniform|victor|whiskey|xray|yankee|zulu)Check if host already exists:
ls hosts/$HOSTNAME 2>/dev/null
If exists, warn user and ask to confirm overwrite
Create directory structure:
mkdir -p hosts/$HOSTNAME/users/jmeskill
Create configuration.nix at hosts/$HOSTNAME/configuration.nix:
{
flake,
inputs,
lib,
pkgs,
...
}: {
imports = [
flake.nixosModules.default
flake.nixosModules.server
./hardware-configuration.nix
];
networking.hostName = "$HOSTNAME";
# Use the recommended "kernel" bootloader for Raspberry Pi
boot.loader.raspberryPi.bootloader = "kernel";
# Resolve nixpkgs registry conflict between main nixpkgs and nixos-raspberrypi's nixpkgs
nix.registry.nixpkgs.to = lib.mkForce {
type = "path";
path = inputs.nixpkgs.outPath;
};
# Disable UPS monitoring (no UPS connected to this Pi)
power.ups.enable = lib.mkForce false;
# Enable SSH for remote access
services.openssh = {
enable = true;
settings = {
PasswordAuthentication = false;
PermitRootLogin = "prohibit-password";
};
};
# User configuration
users.users.jmeskill = {
uid = 1000;
isNormalUser = true;
description = "Jade Meskill";
extraGroups = ["wheel"];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL8rjXP/sjewv6kM1aTtNWkVZKJpZvIAXIRqL81IyEsm iamruinous@ruinous.social"
];
shell = pkgs.fish;
};
security.sudo.wheelNeedsPassword = false;
users.mutableUsers = lib.mkForce true;
users.defaultUserShell = lib.mkForce pkgs.fish;
system.stateVersion = "25.11";
}
Create hardware-configuration.nix at hosts/$HOSTNAME/hardware-configuration.nix:
{lib, ...}: {
# Hardware configuration for Raspberry Pi $MODEL
# Most hardware config is handled by nixos-raspberrypi modules
hardware.enableRedistributableFirmware = true;
# File system configuration for SD card boot
# NOTE: Update these labels after imaging if needed
fileSystems."/" = {
device = "/dev/disk/by-label/NIXOS_SD";
fsType = "ext4";
};
fileSystems."/boot/firmware" = {
device = "/dev/disk/by-label/FIRMWARE";
fsType = "vfat";
options = ["noatime"];
};
swapDevices = [];
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = "aarch64-linux";
}
Create user home-configuration.nix at hosts/$HOSTNAME/users/jmeskill/home-configuration.nix:
{flake, ...}: {
imports = [
flake.homeModules.default
];
}
Add to piHosts in flake.nix:
Find the piHosts = { section and add the new host entry. Use the correct modules based on model:
For Pi 5:
$HOSTNAME = inputs.nixos-raspberrypi.lib.nixosSystem {
specialArgs = {
inherit inputs;
flake = inputs.self;
nixos-raspberrypi = inputs.nixos-raspberrypi;
perSystem = {
self = blueprintOutputs.packages.aarch64-linux;
};
};
modules = [
inputs.nixos-raspberrypi.nixosModules.raspberry-pi-5.base
inputs.nixos-raspberrypi.nixosModules.raspberry-pi-5.display-vc4
inputs.nixos-raspberrypi.nixosModules.sd-image
./hosts/$HOSTNAME/configuration.nix
];
};
For Pi 4:
$HOSTNAME = inputs.nixos-raspberrypi.lib.nixosSystem {
specialArgs = {
inherit inputs;
flake = inputs.self;
nixos-raspberrypi = inputs.nixos-raspberrypi;
perSystem = {
self = blueprintOutputs.packages.aarch64-linux;
};
};
modules = [
inputs.nixos-raspberrypi.nixosModules.raspberry-pi-4.base
inputs.nixos-raspberrypi.nixosModules.raspberry-pi-4.display-vc4
inputs.nixos-raspberrypi.nixosModules.sd-image
./hosts/$HOSTNAME/configuration.nix
];
};
Update hosts/raspberry-pi/README.md - Add the new host to the "Cluster Members" table
Verify the configuration builds:
nix eval .#nixosConfigurations.$HOSTNAME.config.system.build.toplevel.outPath
Output summary:
Created new Raspberry Pi host: $HOSTNAME
Files created:
- hosts/$HOSTNAME/configuration.nix
- hosts/$HOSTNAME/hardware-configuration.nix
- hosts/$HOSTNAME/users/jmeskill/home-configuration.nix
Build SD image:
nix build .#nixosConfigurations.$HOSTNAME.config.system.build.sdImage \
--builders "ssh://armistice.meskill.farm aarch64-linux" --max-jobs 0
Flash to SD card:
zstd -d result/sd-image/*.img.zst -o nixos-$HOSTNAME.img
sudo dd if=nixos-$HOSTNAME.img of=/dev/sdX bs=4M status=progress
/create-pi-host rpc-5-alpha
/create-pi-host rpc-4-bravo
/create-pi-host rpc-5-charlie
Add an AeroSpace window rule to assign an app/window to a workspace (macOS only)
Create or update secrets using Infisical (preferred) or legacy agenix files
Re-encrypt all secrets after modifying .age files or changing host keys
Decrypt and view the contents of an .age secret file
Deploy NixOS/Darwin configuration to local or remote host using justfile commands
Analyze project from URL/path and auto-detect build system to create Nix package