No description
  • HCL 53.4%
  • Nix 23.4%
  • Python 6.9%
  • JavaScript 5.1%
  • Just 5%
  • Other 6.2%
Find a file
2026-08-14 15:27:58 +02:00
deployments Haproxy and wireguard 2026-08-14 15:27:58 +02:00
k8s Update roundcube/roundcubemail Docker tag to v1.7.3 2026-08-11 07:02:29 +00:00
nix Haproxy and wireguard 2026-08-14 15:27:58 +02:00
retired_deployments Remove custom dns from talos stack 2026-07-30 18:47:12 +02:00
retired_terraform Update Terraform proxmox to v3.0.2-rc08 2026-07-10 02:01:30 +00:00
src Move deployments to new folder structure - 04 2026-08-05 22:43:28 +02:00
terraform Restored public git 2026-08-14 15:02:39 +02:00
.awsrc.enc.json awscli setup 2026-05-14 00:44:56 +02:00
.envrc Talos experiments 2026-01-01 12:14:38 +01:00
.gitattributes Plate solver and annotator scripts 2026-07-01 21:26:32 +02:00
.gitignore New mx records + terraform credentials 2026-08-04 17:02:56 +02:00
.gitmodules Hugo homepage 2026-06-28 14:30:17 +02:00
.sops.yaml Remove pangolin. Try out chisel 2026-08-13 23:30:56 +02:00
flake.lock Purge hurtmeplenty domain 2026-06-27 19:26:50 +02:00
flake.nix Kubescape 2026-07-30 12:23:51 +02:00
install_nix.sh Yet another IP change 2025-12-02 15:12:42 +01:00
justfile Remove pangolin. Try out chisel 2026-08-13 23:30:56 +02:00
README.md Cilium migration - 01 2026-02-05 21:23:17 +01:00
renovate.json Blocky 2026-07-30 16:55:08 +02:00

Home Lab

This repository is essentially all is required to set up my Home Lab from scratch, automating as much as possible.

Instructions

Terraform and Ansible are required to provision and configure the various nodes. Provision nodes with:

$ terraform apply

Configure nodes with:

$ ansible-playbook --inventory=$(which terraform-inventory) ansible/site.yml

How to generate an OIDC client secret

$ docker run --rm authelia/authelia:latest authelia crypto hash generate pbkdf2 --variant sha512 --random --random.length 72 --random.charset rfc3986

How to create a sealed secret

Create an env file with a list of key=value pairs:

# /tmp/env

oidc-client-id=some_id
oidc-client-secret=some_secret

Create a secret manifest on the client by reading the env file:

$ kubectl create secret generic actual-secret --dry-run=client --from-env-file=/tmp/env -o yaml > /tmp/secret.yaml

Seal the secret:

$ kubeseal -f /tmp/secret.yaml -o yaml > /tmp/sealed.yaml

Initialize an empty k8s cluster

$ sops exec-file k8s/argocd.enc.yaml \
  'helm upgrade --install argocd -n argocd --create-namespace argo/argo-cd --values {} --reset-values'
$ sops exec-file k8s/secrets.enc.yaml 'kubectl apply -f {}' 
$ helm upgrade --install cilium cilium/cilium --version 1.18.0 --namespace kube-system --values k8s/cilium.yaml 

$ kubectl apply -f deployments/metallb.yaml
$ kubectl apply -f deployments/traefik.yaml

$ kubectl apply -f deployments/democratic-csi.yaml
$ kubectl apply -f deployments/volumes.yaml

$ kube apply -f deployments/

Create authentik kubeconfig

KUBE_API=$(kubectl config view --minify --output jsonpath="{.clusters[*].cluster.server}")
NAMESPACE=authentik
SECRET_NAME=$(kubectl get serviceaccount authentik-remote-cluster -o jsonpath='{.secrets[0].name}' 2>/dev/null || echo -n "authentik-remote-cluster")
KUBE_CA=$(kubectl -n $NAMESPACE get secret/$SECRET_NAME -o jsonpath='{.data.ca\.crt}')
KUBE_TOKEN=$(kubectl -n $NAMESPACE get secret/$SECRET_NAME -o jsonpath='{.data.token}' | base64 --decode)

echo "apiVersion: v1
kind: Config
clusters:
- name: default-cluster
  cluster:
    certificate-authority-data: ${KUBE_CA}
    server: ${KUBE_API}
contexts:
- name: default-context
  context:
    cluster: default-cluster
    namespace: $NAMESPACE
    user: authentik-user
current-context: default-context
users:
- name: authentik-user
  user:
    token: ${KUBE_TOKEN}"

Fix nix template

qmrestore "$IMAGE" "$ID" || can_ignore || die "Could not restore $IMAGE to VM with ID $ID"
qm template "$ID" || die "Could not convert $ID to template"
qm set "$ID" --delete virtio0
qm set "$ID" -scsi0 "local-lvm:base-$ID-disk-0"

Talos system extensions

  • i915
  • iscsi-tools
  • qemu-guest-agent
  • util-linux-tools
  • xe
  • intel-ucode