Personal Homelab IaC with nixos
  • Nix 95.4%
  • Shell 2.1%
  • JavaScript 1%
  • Python 0.9%
  • Just 0.5%
  • Other 0.1%
Find a file
2026-10-30 11:40:04 +01:00
.cursor Dedicated host for Jellyfin 2026-08-28 20:42:37 +02:00
.forgejo/workflows Fix cursor sdk 2026-09-20 18:54:51 +02:00
ansible Add new service Mealie 2026-10-19 15:16:08 +02:00
containers Pinned Romm version, keep updated from time to time 2026-10-13 21:08:02 +02:00
hosts Merge branch 'master' into auto-update/2026-10-16 2026-10-19 15:18:03 +02:00
modules fix: auto-repair attempt 1 2026-10-30 11:31:12 +01:00
packages Small linting edits 2026-06-25 12:07:30 +02:00
scripts Fix cursor sdk 2026-09-20 18:54:51 +02:00
secrets Add new service Mealie 2026-10-19 15:16:08 +02:00
.envrc Direnv and allow unfree 2025-09-29 18:30:30 +02:00
.gitignore Put build files in a subfolder, deleted before commit 2026-08-22 22:31:21 +02:00
flake.lock chore: update flake inputs 2026-10-30 2026-10-30 11:00:48 +01:00
flake.nix Pin authentik 2026.8.1 because it fails to build the new version 2026.8.3 2026-10-04 10:43:52 +02:00
justfile New script for updating all nodes in order 2026-07-25 16:21:41 +02:00
README.md Fix cursor sdk 2026-09-20 18:54:51 +02:00
secrets.nix Add new service Mealie 2026-10-19 15:16:08 +02:00
ssh-keys.nix Add new service Mealie 2026-10-19 15:16:08 +02:00

Papzi homelab configurations

The homelab is split across several hosts configured as LXC containers on a Proxmox machine.

Troubleshooting

Immich

How to use immich-admin. Find the hash of the current version via systemd:

systemctl edit --runtime immich-server.service
sudo -u immich REDIS_SOCKET=/run/redis-immich/redis.sock DB_URL=postgresql:///immich?host=/run/postgresql /nix/store/1z28h62s8vn2rnmd8ja06dzwjpcbz3gp-immich-2.2.3/bin/immich-admin

IP

For convenience, once an IP is assigned it should be configured in PiHole with a .internal domain to simplify routing.

Auto-repair

PRs created by auto-update-pr.yaml (branch auto-update/<date>) are validated by .forgejo/workflows/auto-update.yaml:

  1. Build — nix build for each LXC host (colmena). If all pass, nothing else happens.
  2. Repair — on failure, comment on the PR, collect logs, and run the local Cursor SDK agent (scripts/auto-repair/auto-repair.mjs). The workflow then commits fix: auto-repair attempt N and pushes to the PR branch. A new synchronize event retriggers the loop.

Max 3 repair attempts (counted via commits on the PR branch). After that, the workflow comments and stops.

Model defaults to auto-smart. Override with a Forgejo repository variable CURSOR_MODEL.

Setup

Forgejo repo secrets (Settings → Actions → Secrets):

Secret Purpose
MINE_API_TOKEN Forgejo API (PR comments)
CURSOR_API_KEY Cursor SDK auto-repair (local agent)

Optional repository variable CURSOR_MODEL overrides the default model (auto-smart).

Headless SDK runs with auto-smart require autoReview: true (set automatically in auto-repair.mjs when the model id contains auto). The repair agent is restricted to read/edit/grep/glob — shell and MCP need interactive approval the CI runner cannot provide.

The runner only needs nodejs in hostPackages (already configured in modules/services/forgejo-runner.nix).

Local workflow dry-run (same host packages as CI):

nix develop .#ci-test
ci -W .forgejo/workflows/auto-update.yaml --list

Services up and running

  • Caddy
  • Nextcloud
  • Paperless-ngx
  • Vaultwarden
  • Authentik
  • Immich
  • Technitium DNS
  • Plex
  • Jellyfin
  • Docker
  • Searxng
  • Zigbee2Mqtt
  • Metrics: Grafana and Promethus

Services missing and TODO

  • Uptime Kuma
  • Authentik for Arr services
  • Change mail notification provider
  • Remove pc key from agenix secrets
  • Remove passwordless SSH login for normal user

How to

Build

colmena apply

Check config

nix flake check

Jellyfin GPU (Minerva CT 121)

Unprivileged LXC: pass /dev/dri with Proxmox devN (PVE 8.1+). Guest GIDs are pinned to video=26 and render=303. On minerva:

ls -l /dev/dri
pct set 121 --dev0 /dev/dri/card0,gid=26
pct set 121 --dev1 /dev/dri/renderD128,gid=303
pct reboot 121

See hosts/jellyfin/proxmox-ct-121.conf. In the guest: ls -ln /dev/dri and sudo -u jellyfin vainfo.