一键导入
infra
Infrastructure lifecycle management. Terragrunt modules, Ansible playbooks, NixOS configs, Proxmox VMs, MikroTik networking, and TrueNAS storage.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Infrastructure lifecycle management. Terragrunt modules, Ansible playbooks, NixOS configs, Proxmox VMs, MikroTik networking, and TrueNAS storage.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Full lifecycle management for Talos Linux Kubernetes clusters (shared, apps). Status checks, troubleshooting, upgrades, scaling, and Terragrunt deployments.
Kubernetes workload management for homelab clusters. ArgoCD apps, deployments, pods, logs, storage, networking, and debugging.
| name | infra |
| description | Infrastructure lifecycle management. Terragrunt modules, Ansible playbooks, NixOS configs, Proxmox VMs, MikroTik networking, and TrueNAS storage. |
You are managing homelab infrastructure spanning Proxmox VE, MikroTik, TrueNAS, NixOS, and Terragrunt.
| Node | Role | LAN IP | Storage IP | AMT IP |
|---|---|---|---|---|
| grogu | Single node (P700) | 192.168.0.10 | 10.10.10.10 | 10.10.1.10 |
| VMID | Name | Node | Purpose |
|---|---|---|---|
| 300 | truenas-primary | grogu | TrueNAS SCALE (HBA passthrough) |
| 400-402 | shared-cp* | grogu | Talos K8s shared control plane |
| 410-411 | shared-worker* | grogu | Talos K8s shared workers |
| VLAN | Name | Subnet | Bridge | Purpose |
|---|---|---|---|---|
| 1 | management | 10.10.1.0/24 | — | AMT, switches |
| 10 | storage | 10.10.10.0/24 | vmbr10 | 10GbE NFS/iSCSI |
| 20 | lan | 192.168.0.0/24 | vmbr20 | VMs, clients, WiFi |
| 30 | k8s-shared | 10.0.1.0/24 | vmbr30 | K8s shared cluster |
| 31 | k8s-apps | 10.0.2.0/24 | vmbr31 | K8s apps cluster |
| 32 | k8s-test | 10.0.3.0/24 | vmbr32 | K8s test cluster |
When the user invokes /infra, parse $ARGUMENTS to determine the action.
/infra plan [module] — Plan a Terragrunt module or all modules
# Single module
just tg-plan-module <module>
# All modules
just tg-plan
Module paths are relative to infrastructure/prod/ (e.g., storage/truenas-primary, compute/k8s-shared, mikrotik/base).
/infra apply [module] — Apply a Terragrunt module
ALWAYS ask for explicit confirmation before applying.
just tg-apply-module <module>
/infra validate [module] — Validate Terragrunt configuration
just tg-validate
/infra list — List all Terragrunt modules
just tg-list
/infra graph — Show Terragrunt dependency graph
just tg-graph
/infra show <module> — Read and summarize a module's configuration
Read these files:
infrastructure/prod/<module>/terragrunt.hclinfrastructure/prod/<module>/main.tfinfrastructure/prod/<module>/variables.tf (if exists)infrastructure/modules/ (if referenced)prod/
resource-pools/ # Proxmox resource pool management
images/ # ISO/image downloads (TrueNAS, NixOS, Talos)
compute/
arr-stack/ # NixOS arr media stack VM
k8s-shared/ # Talos shared cluster (use /talos instead)
k8s-apps/ # Talos apps cluster (use /talos instead)
argocd/ # ArgoCD on k8s-shared (Helm)
storage/
truenas-primary/ # TrueNAS primary VM (grogu, HBA passthrough)
mikrotik/
base/ # Bridge, VLANs, ports, WAN, jumbo frames
firewall/ # Firewall rules (depends on base)
dns/ # DNS forwarding to Pi-hole
qos/ # QoS shaping (depends on base)
dhcp/
vlan-20-lan/ # DHCP for LAN
vlan-30-k8s-shared/ # DHCP for K8s shared
vlan-31-k8s-apps/ # DHCP for K8s apps
vlan-32-k8s-test/ # DHCP for K8s test
dns/
cloudns/ # Wildcard DNS records for clusters
tailscale/
acl/ # Tailscale ACL policy
dev/
resource-pools/ # Dev Proxmox pools
images/ # Dev Talos images
/infra ansible <target> — Run Ansible against a target
# Proxmox nodes
just ansible-ping # Test connectivity
just ansible-configure-all # Configure all nodes
just ansible-configure <host> # Configure specific node (e.g., grogu)
# Proxmox networking
just proxmox-configure-networking # Configure VLAN bridges
just proxmox-configure-networking-check # Dry-run
# Proxmox API tokens
just proxmox-create-api-tokens
just proxmox-rotate-api-tokens
# TrueNAS
just truenas-ping # Test connectivity
just truenas-setup # Configure TrueNAS
# Backups
just restic-setup # Configure B2 cloud backups (offsite)
/infra ansible-check — Run Ansible lint
just ansible-lint
/infra nixos <target> — NixOS operations
# Pi-hole (Raspberry Pi, aarch64)
just nixos-vm-up # Start build VM (one-time)
just nixos-build-pihole # Build SD image
just nixos-flash-pihole /dev/rdiskX # Flash to SD card
just nixos-deploy-pihole # Deploy via SSH
# Arr Stack (Proxmox VM at 192.168.0.50)
just nixos-install-arr-stack <ip> # Initial install (nixos-anywhere)
just nixos-update-arr-stack # Deploy via SSH
/infra nixos-show <config> — Show a NixOS configuration
Read files from nix/<config>/ (e.g., rpi-pihole, arr-stack).
/infra proxmox status — Show Proxmox cluster status
Use the Proxmox MCP tools:
proxmox_get_cluster_status for cluster overviewproxmox_get_nodes for node listproxmox_get_vms for all VMs/infra proxmox node <name> — Show detailed node status
Use proxmox_get_node_status with node name (grogu).
/infra proxmox vm <vmid> — Show VM status
Use proxmox_get_vm_status. Determine node from the VM inventory above.
/infra proxmox storage — Show storage pools
Use proxmox_get_storage.
/infra mikrotik show — Show MikroTik router configuration
Read and summarize modules under infrastructure/prod/mikrotik/.
/infra mikrotik plan — Plan MikroTik changes
just tg-plan-module prod/mikrotik/base
just tg-plan-module prod/mikrotik/firewall
just tg-plan-module prod/mikrotik/dns
just tg-plan-module prod/mikrotik/qos
/infra truenas status — Check TrueNAS connectivity and VM status
just truenas-ping
Also use proxmox_get_vm_status for VMID 300 (primary).
/infra truenas setup — Run TrueNAS configuration
Ask for confirmation.
just truenas-setup
/infra globals — Show key values from globals.hcl
Read and summarize infrastructure/globals.hcl (IPs, VLANs, versions, cluster config).
/infra globals edit — Edit globals.hcl
Open infrastructure/globals.hcl for editing.
/infra lint — Run all pre-commit hooks
just lint
/infra fmt — Format Terraform files
just tg-fmt
infrastructure/prod/ unless prefixed with dev/just commands listed aboveterragrunt apply, terragrunt destroy, or terraform destroy without explicit user confirmationinfrastructure/globals.hclinfrastructure/root.hclinfrastructure/prod/provider.hclinfrastructure/modules/nix/ansible/justfile (all commands)