Infrastructure mono-repo for homelab operations.
This repository contains:
- NixOS host configurations (
chopin,beethoven) - Shared NixOS modules and profiles
- VM-specific configuration placeholders (e.g. VyOS)
- Terraform code for infra components
- Secrets and deployment script scaffolding
chopin: small, efficient AMD hostbeethoven: large virtualization host (2x Xeon E5-2699 v3, 128 GB RAM, dual GTX 1080)
.
├── flake.nix
├── nix/
│ ├── hosts/
│ │ ├── chopin/
│ │ └── beethoven/
│ ├── modules/
│ │ └── nixos/
│ ├── profiles/
│ └── vms/
│ └── nixos/
├── vms/
│ └── vyos/
├── terraform/
│ ├── envs/
│ └── modules/
├── secrets/
└── scripts/
- Install Nix with flakes enabled.
- Enter the tooling shell:
nix develop
- Build host configs:
nix build .#nixosConfigurations.chopin.config.system.build.toplevel nix build .#nixosConfigurations.beethoven.config.system.build.toplevel
- Switch on target host:
sudo nixos-rebuild switch --flake .#chopin # or sudo nixos-rebuild switch --flake .#beethoven
- Replace each host
hardware-configuration.nixwith output fromnixos-generate-configon that machine. - Secrets are intended to be managed through
sops/age. - Terraform environments are split by
terraform/envs/<name>.
From a NixOS installer shell on chopin:
git clone <this-repo-url> /root/home-infra
cd /root/home-infra
nix --extra-experimental-features 'nix-command flakes' shell \
nixpkgs#gptfdisk nixpkgs#parted nixpkgs#dosfstools nixpkgs#util-linux nixpkgs#zfs \
-c ./scripts/install-chopin.sh
# or with explicit overrides:
DISK=/dev/nvme0n1 SWAP_SIZE_GB=32 FLAKE=/root/home-infra#chopin ./scripts/install-chopin.shThis script wipes the target disk and creates:
EFIpartition mounted at/bootSWAPpartition- ZFS pool
zrootwith root datasetzroot/root/nixos
- Add
sops-nixintegration inflake.nix - Add remote deployment (e.g.
deploy-rsorcolmena) - Add CI checks for
nix flake check, formatting, and terraform validation