blob: 884097ab9122dae4ab0b6be36c7416bb9ad3aa6f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
# My Home-Lab as Code
> BEWARE! This project is in MEGA flux atm as I migrate most things to `nix/`.
Welcome to my home-lab!
This is my personal project to setup all my `r/self-hosted` services in my home-lab.
The goal of this repo is to be able to survive a dooms-day scenario where all
of my hosts die, and I can use to use this repo to be able to re-create it all with *ease*.
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 VMs
├── nix/
# (DEPRECATED) Configurations for my VMs
├── ansible/
...
```
Example run:
```
❯ ./manage.sh
=== 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?
* The NAS. I already covered this in my blog [here](https://kumardamani.net/post/nas-upgrade.html).
* The Proxmox install itself, along with networking config of my lab. VPN, VLANs etc.
I go over this in my [blog](https://kumardamani.net/post/framework-server.html).
For now, its all manual.
|