From 276c9bd2a751f90911689a37e3a86f4a26056e23 Mon Sep 17 00:00:00 2001 From: Kumar Damani Date: Tue, 15 Sep 2026 16:29:29 -0400 Subject: automate adding new host flow --- README.md | 55 +++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 49 insertions(+), 6 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 9a0f1bf..884097a 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ # My Home-Lab as Code -> BEWARE! This project is in MEGA flux atm. Check the `nix/` for the latest stuff as I -migrate most things there. +> BEWARE! This project is in MEGA flux atm as I migrate most things to `nix/`. Welcome to my home-lab! @@ -13,21 +12,65 @@ of my hosts die, and I can use to use this repo to be able to re-create it all w The flow is simple. First provision a VM with `tofu`. Then deploy the configuration with `nix`. +The `manage.sh` script can do the full flow for you while prompting you to verify +prior to applying changes to real infra. + This is a monorepo with the following structure: ```tree # Definitions for my Proxmox VMs, and LXC (legacy) ├── terraform/ -# Configurations for my services +# Configurations for my VMs ├── nix/ -# Configurations for my services (legacy) +# (DEPRECATED) Configurations for my VMs ├── ansible/ ... ``` -# Architecture +Example run: +``` +❯ ./manage.sh -tbd +=== home-lab manager === + 1) add a new host + 2) update an existing host + 3) update all hosts + 4) update base image + template + q) quit +> 2 +Hosts: + 1) caldav + 2) git + 3) monitoring-2 + 4) photos + 5) rproxy-2 + 6) s3 + 7) torrents-2 +Host name/number: 3 +Deploy action [switch/boot, default switch]: +→ [monitoring-2] Host keys match, no action needed +→ [monitoring-2] Deploying with nixos-rebuild... +warning: Git tree '/home/kdam0/projects/home-lab' is dirty +building the system configuration... +warning: Git tree '/home/kdam0/projects/home-lab' is dirty +copying 0 paths... +Checking switch inhibitors... done +updating GRUB 2 menu... +activating the configuration... +setting up /etc... +reloading user units for jefe... +restarting the following user units: nixos-activation.service +restarting sysinit-reactivation.target +the following new units were started: sysinit-reactivation.target, systemd-tmpfiles-resetup.service +Done. The new configuration is /nix/store/2s6jq4jhvrhxzv5h73qvb0z1qyi05nkr-nixos-system-monitoring-2-26.11.20260910.8ce4ef6 +=== home-lab manager === + 1) add a new host + 2) update an existing host + 3) update all hosts + 4) update base image + template + q) quit +> q +``` # What is NOT covered in this repo? -- cgit v1.2.3