Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

home-infra

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

Naming

  • chopin: small, efficient AMD host
  • beethoven: large virtualization host (2x Xeon E5-2699 v3, 128 GB RAM, dual GTX 1080)

Layout

.
├── flake.nix
├── nix/
│   ├── hosts/
│   │   ├── chopin/
│   │   └── beethoven/
│   ├── modules/
│   │   └── nixos/
│   ├── profiles/
│   └── vms/
│       └── nixos/
├── vms/
│   └── vyos/
├── terraform/
│   ├── envs/
│   └── modules/
├── secrets/
└── scripts/

Quick start

  1. Install Nix with flakes enabled.
  2. Enter the tooling shell:
    nix develop
  3. Build host configs:
    nix build .#nixosConfigurations.chopin.config.system.build.toplevel
    nix build .#nixosConfigurations.beethoven.config.system.build.toplevel
  4. Switch on target host:
    sudo nixos-rebuild switch --flake .#chopin
    # or
    sudo nixos-rebuild switch --flake .#beethoven

Notes

  • Replace each host hardware-configuration.nix with output from nixos-generate-config on that machine.
  • Secrets are intended to be managed through sops/age.
  • Terraform environments are split by terraform/envs/<name>.

Chopin fresh install (single NVMe + ZFS)

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.sh

This script wipes the target disk and creates:

  • EFI partition mounted at /boot
  • SWAP partition
  • ZFS pool zroot with root dataset zroot/root/nixos

Next steps

  • Add sops-nix integration in flake.nix
  • Add remote deployment (e.g. deploy-rs or colmena)
  • Add CI checks for nix flake check, formatting, and terraform validation

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages